[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. eda668423fa87898c59d1075118693714aa5a053

Andreas Beckmann debian at abeckmann.de
Fri Dec 23 10:25:53 UTC 2011


The following commit has been merged in the master branch:
commit 29c9fa67fd0fe8ae37b58d5790bfb3f1d9878a3f
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Mon Nov 21 01:25:54 2011 +0100

    fix triggering tarball recreation
    
    convert the timeouts from the config file to integers,
    otherwise comparison does not work
    improve verboseness of tarball recreation checks
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts-slave.py b/piuparts-slave.py
index 9acd92f..917f799 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -427,9 +427,9 @@ def create_or_replace_chroot_tgz(config, tgz, tgz_ctrl, distro):
         statobj = os.stat(tgz)
         # stat.ST_MTIME is actually time file was initially created
         age = now - statobj[stat.ST_MTIME]
-        logging.info("Check-replace tgz: age (%d-%d=%d) vs. max(%s)\n" % (now, statobj[stat.ST_MTIME], age, max_tgz_age))
+        logging.info("Check-replace %s: age=%d vs. max=%d" % (tgz, age, max_tgz_age))
         if age > max_tgz_age:
-            logging.info("Limit-replace tgz: retry-time (%d-%d=%d) vs. min(%s)\n" % (now, statobj[stat.ST_CTIME], now - statobj[stat.ST_CTIME], min_tgz_retry_delay))
+            logging.info("Limit-replace %s: last-retry=%d vs. min=%d" % (now - statobj[stat.ST_CTIME], min_tgz_retry_delay))
             # stat.ST_CTIME is time created OR last renamed
             if min_tgz_retry_delay is None or now - statobj[stat.ST_CTIME] > min_tgz_retry_delay:
                 os.rename(tgz, tgz + ".old")
@@ -490,7 +490,8 @@ def main():
                master_host=global_config["master-host"],
                master_user=global_config["master-user"],
                master_directory=global_config["master-directory"],
-               base_tgz_ctrl=[global_config["max-tgz-age"],global_config["min-tgz-retry-delay"]])
+               base_tgz_ctrl=[int(global_config["max-tgz-age"]),
+                              int(global_config["min-tgz-retry-delay"])])
         sections.append(section)
 
     while True:

-- 
piuparts git repository



More information about the Piuparts-commits mailing list