]> xenbits.xensource.com Git - osstest.git/commitdiff
backports snapshot: Honour DebianSnapshotBackports_<suite> config var
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 13 Feb 2019 16:53:49 +0000 (16:53 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 13 Feb 2019 18:13:34 +0000 (18:13 +0000)
If this is set, use it instead of the usual DebianMirrorHost and
Subpath.  No functional change with configs that don't set it.

This is not sufficient to work right yet, because snapshots
repositories have out-of-date signatures...

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Debian.pm

index c6858253a71140512611e7a2ef5573d473314752..ee7e03cf86b9cc6df40057a2e1c66158f8c5058b 100644 (file)
@@ -946,6 +946,9 @@ sub preseed_backports_packages ($$$$@) {
     my ($ho, $sfx, $xopts, $suite, @pkgs) = @_;
 
     if (! $xopts->{BackportsSourcesAlreadyAdded}++) {
+       my $bp_url = $c{"DebianSnapshotBackports_$suite"};
+       $bp_url ||= "http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath}";
+
        preseed_hook_command($ho, 'late_command', $sfx, <<END);
 #!/bin/sh
 set -ex
@@ -953,7 +956,7 @@ set -ex
 cat <<EOF >>/target/etc/apt/sources.list
 
 # $suite backports
-deb http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath} $suite-backports main
+deb $bp_url $suite-backports main
 EOF
 in-target apt-get update
 END