[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-656-gc294e8d

Andreas Beckmann debian at abeckmann.de
Mon Jun 4 11:59:01 UTC 2012


The following commit has been merged in the develop branch:
commit b68607ace6d188e092f2fe8d7b834ff78074b787
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Jun 3 09:38:01 2012 +0200

    p-s: generate the master_command from global setting
    
    Take the global master-command and append the section.
    Avoid having a nearly identical command in each piuparts.conf section.
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/README.txt b/README.txt
index 36b2178..abd9800 100644
--- a/README.txt
+++ b/README.txt
@@ -416,6 +416,8 @@ used for all further sections.
 
 * "master-directory" is the directory where the master keeps its files. Can be relative to the master's home directory.
 
+* "master-command" is the command to run on master-host to start the master. When the master has been installed from the Debian package, the command is 'python /usr/share/piuparts/piuparts-master'.  The section name will be given as a command line argument to this command.
+
 * "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.
 
 * "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.
@@ -427,8 +429,6 @@ used for all further sections.
 The section specific settings will be reloaded each time a section
 is being run.
 
-* "master-command" is the command to run on master-host to start the master. When the master has been installed from the Debian package, the command is 'python /usr/share/piuparts/piuparts-master'.  If you want to use a section in the master configuration file other than "master", append the section name to this command.  For example, if the master configuration file has a "sid-ia64" section that you want to use, the command should be 'python /usr/share/piuparts/piuparts-master sid-ia64'.
-
 * "log-file" is the name of a file to where the master should write its log messages. In the default configuration file it is "/dev/null", that is, log messages are not put in a file.
 
 * "packages-url" is a URL to the Packages.bz2 file specifying what packages should be tested. This needs to be a Packages.bz2 file, other compression methods are not supported. For example, you might use 'http://ftp.debian.org/debian/dists/sid/main/binary-i386/Packages.bz2' but you really do want to replace "ftp.debian.org" with the name of your local mirror.
diff --git a/conf/piuparts.conf.sample b/conf/piuparts.conf.sample
index 5ff6013..c118d1d 100644
--- a/conf/piuparts.conf.sample
+++ b/conf/piuparts.conf.sample
@@ -16,6 +16,7 @@ master-host = localhost
 master-user = piupartsm
 master-directory = /var/lib/piuparts/master
 output-directory = /var/lib/piuparts/htdocs
+master-command = python /usr/share/piuparts/piuparts-master
 idle-sleep = 300
 max-tgz-age = 604800
 reschedule-old-days = 90
@@ -27,7 +28,6 @@ reschedule-fail-count = 25
 [sid]
 precedence = 1
 description = "Debian sid / main"
-master-command = python /usr/share/piuparts/piuparts-master sid
 # mirror = http://your.mirror.here/debian
 # packages-url = http://your.mirror.here/debian/dists/sid/main/binary-i386/Packages.bz2
 # sources-url = http://your.mirror.here/debian/dists/sid/main/source/Sources.bz2
@@ -43,6 +43,5 @@ log-file = sid-master.log
 
 ## another example:
 ## [s-p-u-i386]
-## master-command = python /usr/share/piuparts/piuparts-master.py s-p-u-i386
 ## packages-url = http://ftp.debian.org/debian/dists/stable-proposed-updates/binary-i386/Packages.bz2
 
diff --git a/debian/changelog b/debian/changelog
index d86a541..a6553dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -52,6 +52,8 @@ piuparts (0.45) UNRELEASED; urgency=low
       + /var/lib/openvswitch/(pki/.*)?
       + /var/spool/powerdns/                    (Closes: #531134, #531135)
   * piuparts.conf:
+    - Make master-command a [global] instead of a [section] setting.
+      The section name will be given as an argument to this command.
     - Removed deprecated keys: known_circular_depends.
   * master/db/report: Add a new category /affected/ for failed logs where the
     bug is in a dependency, but only exposed by the package being tested.
@@ -83,6 +85,7 @@ piuparts (0.45) UNRELEASED; urgency=low
     - Randomize waiting time (between 60 and 180 seconds) if master is busy.
     - Sleep until the next section can be tried, but at least 1 minute.
     - Simplify and merge Section.setup() into Section.__init__().
+    - Generate master command: use global setting and append section.
   * piuparts-report.py:
     - Remove known_circular_depends handling.
     - Exclude obsolete states from generated report.
diff --git a/piuparts-slave.py b/piuparts-slave.py
index c2facc4..bd2ced1 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -274,7 +274,7 @@ class Section:
         self._slave.set_master_host(self._global_config["master-host"])
         self._slave.set_master_user(self._global_config["master-user"])
         self._slave.set_master_directory(self._global_config["master-directory"])
-        self._slave.set_master_command(self._config["master-command"])
+        self._slave.set_master_command(self._global_config["master-command"] + " " + self._config.section)
         self._log_file=self._config["log-file"]
 
 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list