]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
Debian mirror selection: Provide debian_archive_url_suite_arch
authorIan Jackson <iwj@xenproject.org>
Tue, 9 Feb 2021 12:27:34 +0000 (12:27 +0000)
committerIan Jackson <iwj@xenproject.org>
Tue, 9 Feb 2021 15:12:32 +0000 (15:12 +0000)
mg-debian-installer-update is going to want this.  NFC.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Osstest/Debian.pm

index 05cc6e1f72abd55ea37610a35f6db52ad43eb3e4..dee52b3d05912c365641828f2bfe0c2b15a75206 100644 (file)
@@ -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);