[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.49-105-gac1319a

Andreas Beckmann anbe at debian.org
Fri Mar 1 15:32:55 UTC 2013


The following commit has been merged in the piatti branch:
commit 2b3884d21cceab6ab21c3e5c0a01a2fa07c2e83b
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Tue Jan 22 02:00:14 2013 +0100

    p-s: tarball recreation can be disabled with max-tgz-age = 0
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/README.txt b/README.txt
index ba97216..c99b4ea 100644
--- a/README.txt
+++ b/README.txt
@@ -504,7 +504,7 @@ section, too, and will serve as defaults for all other sections
 * "max-tgz-age" is used to specify the maximum age (in seconds)
  after which basesystem tarballs will be recreated. If recreation
  fails, the old tarball will be used again. The default is 2592000
- seconds, which is 30 days.
+ seconds, which is 30 days. A value of 0 disables recreation.
 
 * "min-tgz-retry-delay" is used to specify the minimum time (in
  seconds) between attempts to recreate a tarball which was created
diff --git a/debian/changelog b/debian/changelog
index c7fa9f6..9f002c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ piuparts (0.50) UNRELEASED; urgency=low
   * piupartslib/packagesdb.py:
   * piuparts-master.py:
   * piuparts-slave.py:
+    - Tarball recreation can be disabled by setting max-tgz-age to 0.
   * piuparts-analyze.py:
     - Add support for magic "$DISTRO/None" versions.
   * piuparts-report.py:
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 92a36c8..8ad091e 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -760,10 +760,10 @@ def create_chroot(config, tarball, distro):
         os.rename(tarball + ".new", tarball)
 
 def create_or_replace_chroot_tgz(config, tgz, distro):
+    max_tgz_age = int(config["max-tgz-age"])
+    min_tgz_retry_delay = int(config["min-tgz-retry-delay"])
     forced = 0
-    if os.path.exists(tgz):
-        max_tgz_age = int(config["max-tgz-age"])
-        min_tgz_retry_delay = int(config["min-tgz-retry-delay"])
+    if os.path.exists(tgz) and max_tgz_age > 0:
         now = time.time()
         statobj = os.stat(tgz)
         # stat.ST_MTIME is actually time file was initially created

-- 
piuparts git repository



More information about the Piuparts-commits mailing list