[Piuparts-commits] rev 557 - in trunk: . debian

Holger Levsen holger at alioth.debian.org
Wed Dec 9 18:33:57 UTC 2009


Author: holger
Date: 2009-12-09 18:33:57 +0000 (Wed, 09 Dec 2009)
New Revision: 557

Modified:
   trunk/Makefile
   trunk/README.txt
   trunk/debian/changelog
   trunk/piuparts-slave.py
Log:
include time into string for date based version

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2009-12-09 16:53:22 UTC (rev 556)
+++ trunk/Makefile	2009-12-09 18:33:57 UTC (rev 557)
@@ -10,7 +10,7 @@
 etcdir = $(prefix)/etc
 distribution=${shell dpkg-parsechangelog | sed -n 's/^Distribution: *//p'}
 ifeq ($(distribution),UNRELEASED)
-version=${shell echo "`dpkg-parsechangelog | sed -n 's/^Version: *//p'`~`date +%Y%m%d`"}
+version=${shell echo "`dpkg-parsechangelog | sed -n 's/^Version: *//p'`~`date +%Y%m%d%H%M`"}
 else
 version=${shell dpkg-parsechangelog | sed -n 's/^Version: *//p'}
 endif

Modified: trunk/README.txt
===================================================================
--- trunk/README.txt	2009-12-09 16:53:22 UTC (rev 556)
+++ trunk/README.txt	2009-12-09 18:33:57 UTC (rev 557)
@@ -355,7 +355,7 @@
 
 * "sections" defaults to sid and defines which sections should be processed in master-slave mode. Each section defined here has to have a section with the section specific settings explained below. The first section defined should always be sid, because the data from first section a package is in is used for the source package html report.
 
-* "idle-sleep" is the length of time the slave should wait before querying the master again if the master didn't have any new packages to test. In seconds, so a value of 300 would mean five minutes, and that seems to be a good value when there are fairly few slaves per master. The default is 10 seconds.
+* "idle-sleep" is the length of time the slave should wait before querying the master again if the master didn't have any new packages to test. In seconds, so a value of 300 would mean five minutes, and that seems to be a good value when there are fairly few slaves per master. The default is 300 seconds.
   
 * "master-host" is the host where the master exists. The slave will give this host to ssh.
   

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-12-09 16:53:22 UTC (rev 556)
+++ trunk/debian/changelog	2009-12-09 18:33:57 UTC (rev 557)
@@ -21,9 +21,12 @@
     * Create policy-rc.d in 2nd chroot when using -b. (Closes: #466049)
       Thanks again to Patrick Schoenfeld for his help.
   * piuparts-report: report broken symlinks.
-  * piuparts-slave: gracefully deal with upgrade-test-distros and 
-    upgrade-test-chroot-tgz not being set in the configuration. Thanks to Carl
-    Chenet and Patrick Schoenfeld for the patch. (Closes: #519192)
+  * piuparts-slave: 
+    - gracefully deal with upgrade-test-distros and upgrade-test-chroot-tgz 
+      not being set in the configuration. Thanks to Carl Chenet and Patrick 
+      Schoenfeld for the patch. (Closes: #519192)
+    - new default value for idle-sleep, 300 instead of 10 seconds. Also the
+      slave will now only sleep if there is nothing to do for any section.
   * Makefile: workaround 559305 by calling a2x twice.   
   * Update debian/NEWS.
 

Modified: trunk/piuparts-slave.py
===================================================================
--- trunk/piuparts-slave.py	2009-12-09 16:53:22 UTC (rev 556)
+++ trunk/piuparts-slave.py	2009-12-09 18:33:57 UTC (rev 557)
@@ -62,7 +62,7 @@
             {
                 "sections": "slave",
                 "slave-directory": section,
-                "idle-sleep": "10",
+                "idle-sleep": "300",
                 "master-host": None,
                 "master-user": None,
                 "master-directory": ".",
@@ -281,10 +281,7 @@
 
         self._slave.close()
 
-        if not self._slave.get_reserved():
-            logging.info("Nothing to do, sleeping for a bit")
-            time.sleep(int(self._idle_sleep))
-        else:
+        if self._slave.get_reserved():
             packages_files = {}
             if self._config["upgrade-test-distros"]:
                 distros = [self._config["distro"]] + self._config["upgrade-test-distros"].split()
@@ -449,6 +446,13 @@
     while True:
         for section in sections:
             section.run()
+        idle = True
+        for section_name in section_names:
+          if os.listdir(os.path.join(global_config["master-directory"],section_name,"reserved")):
+            idle = False
+        if idle:
+          logging.info("Nothing to do, sleeping for a bit")
+          time.sleep(int(self._idle_sleep))
 
 
 if __name__ == "__main__":




More information about the Piuparts-commits mailing list