]> xenbits.xensource.com Git - osstest.git/commitdiff
backports snapshot: Disable apt timestamp checking (sometimes)
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 13 Feb 2019 17:05:20 +0000 (17:05 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 13 Feb 2019 18:13:34 +0000 (18:13 +0000)
In jessie and earlier, this has to be done with a global option.

In later releases, it can be done by putting some options in [ ]
in the relevant sources list entry.

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

index 5e74e86e67b44114d52e34cdd85dc55e2a26b199..c1e7502011bc3068d426d7b4608b689c9d7f384b 100644 (file)
@@ -951,6 +951,19 @@ sub preseed_backports_packages ($$$$@) {
 
        my $apt_insert='';
        my $extra_rune='';
+       if ($suite =~ m/wheezy|jessie/) {
+           # this has global effect, unfortunately
+           $extra_rune = <<END;
+d=/etc/apt/apt.conf.d
+mkdir -p \$d
+cat >\$d/50osstestsnapshot <<EOF
+Acquire::Check-Valid-Until false;
+EOF
+END
+       } else {
+           $apt_insert = '[check-valid-until=no]';
+       }
+
        preseed_hook_command($ho, 'late_command', $sfx, <<END);
 #!/bin/sh
 set -ex