From: Ian Jackson Date: Tue, 9 Feb 2021 12:27:34 +0000 (+0000) Subject: Debian mirror selection: Provide debian_archive_url_suite_arch X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9b34f5a019247af91e6bbce14d6a92d7cfe02dc6;p=osstest.git Debian mirror selection: Provide debian_archive_url_suite_arch mg-debian-installer-update is going to want this. NFC. Signed-off-by: Ian Jackson --- diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 05cc6e1..dee52b3 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -814,12 +814,8 @@ chmod 600 $subdir/etc/ssh/ssh_host_*_key ||: END } -sub debian_mirror_url ($) { - # I think ideally this should handle, and be used for, backports too. - # It would need an optional suite suffix which could be "-backports"? - my ($ho) = @_; - my $suite = $ho->{Suite}; - my $arch = $ho->{Arch}; +sub debian_mirror_url_suite_arch ($$) { + my ($suite, $arch) = @_; my $url = $c{"DebianMirror_${suite}_${arch}"} // $c{"DebianMirror_${suite}"} // @@ -830,6 +826,13 @@ sub debian_mirror_url ($) { return $url; } +sub debian_mirror_url ($) { + # I think ideally this should handle, and be used for, backports too. + # It would need an optional suite suffix which could be "-backports"? + my ($ho) = @_; + return debian_mirror_url_suite_arch($ho->{Suite}, $ho->{Arch}); +} + sub debian_mirror_host_path ($) { my ($ho) = @_; my $url = debian_mirror_url($ho);