[Piuparts-commits] [piuparts] 01/10: p: add --no-check-valid-until option to ignore Release file expiration

Holger Levsen holger at layer-acht.org
Sun May 1 11:55:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 1081b3d0d371da1cd051f4b84d466069b93244c9
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun May 1 09:05:57 2016 +0200

    p: add --no-check-valid-until option to ignore Release file expiration
    
    this happens on archived releases after some time
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 debian/changelog | 2 ++
 piuparts.1.txt   | 4 ++++
 piuparts.py      | 9 +++++++++
 3 files changed, 15 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 303d95a..66c26b2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ piuparts (0.71) UNRELEASED; urgency=medium
   [ Andreas Beckmann ]
   * piuparts.py:
     - Define namedtuple FileInfo globally s.t. it can be pickled.
+    - New option --no-check-valid-until to set apt option
+      Acquire::Check-Valid-Until=false for testing archived releases.
   * distros.conf: squeeze-* has been archived/removed.
   * piuparts-reports.py:
     - Skip section on HTTPError while downloading Packages.
diff --git a/piuparts.1.txt b/piuparts.1.txt
index bd9fb22..a857f4d 100644
--- a/piuparts.1.txt
+++ b/piuparts.1.txt
@@ -163,6 +163,10 @@ Note that file: addresses works if the directories are made accessible from with
 *--no-adequate*::
   Don't run adequate after installation. The default is to run adequate, provided it is installed.
 
+*--no-check-valid-until*::
+  Set apt option Acquire::Check-Valid-Until=false in the chroot to ignore the
+  expiration of Release files. This is needed for testing archived releases.
+
 *--no-diversions*::
   Don't check for broken diversions.
 
diff --git a/piuparts.py b/piuparts.py
index 7371408..223844d 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -162,6 +162,7 @@ class Settings:
         self.keep_sources_list = False
         self.keyring = None
         self.do_not_verify_signatures = False
+        self.no_check_valid_until = False
         self.install_recommends = False
         self.eatmydata = True
         self.dpkg_force_unsafe_io = True
@@ -924,6 +925,8 @@ class Chroot:
         lines.append('APT::Install-Suggests "0";\n')
         lines.append('APT::Get::AllowUnauthenticated "%s";\n' % settings.apt_unauthenticated)
         lines.append('Acquire::PDiffs "false";\n')
+        if settings.no_check_valid_until:
+            lines.append('Acquire::Check-Valid-Until "false";\n')
         if settings.proxy:
             proxy = settings.proxy
         elif "http_proxy" in os.environ:
@@ -2730,6 +2733,11 @@ def parse_command_line():
                       action='store_true',
                       help="Do not verify signatures from the Release files when running debootstrap.")
 
+    parser.add_option("--no-check-valid-until",
+                      default=False,
+                      action='store_true',
+                      help="Set apt option Acquire::Check-Valid-Until=false for testing archived releases.")
+
     parser.add_option("--allow-database", default=False,
                       action='store_true',
                       help="Allow database servers (MySQL, PostgreSQL) to be started in the chroot.")
@@ -2977,6 +2985,7 @@ def parse_command_line():
         settings.apt_unauthenticated = "Yes"
     else:
         settings.apt_unauthenticated = "No"
+    settings.no_check_valid_until = opts.no_check_valid_until
     settings.install_recommends = opts.install_recommends
     settings.eatmydata = not opts.no_eatmydata
     settings.dpkg_force_unsafe_io = not opts.dpkg_noforce_unsafe_io

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list