[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-749-g57a6ca1
Andreas Beckmann
debian at abeckmann.de
Mon Jun 18 10:40:02 UTC 2012
The following commit has been merged in the develop branch:
commit 10a4b371afd23471767794f54ee04ba9bad66994
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Mon Jun 18 00:35:22 2012 +0200
p-s: allow section specific tgz timeouts
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piuparts-slave.py b/piuparts-slave.py
index f86d455..72411de 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -262,8 +262,6 @@ class Section:
if self._config["chroot-tgz"] and not self._config["distro"]:
logging.info("The option --chroot-tgz needs --distro.")
- self._base_tgz_ctrl = [int(global_config["max-tgz-age"]),
- int(global_config["min-tgz-retry-delay"])]
if int(self._config["max-reserved"]) > 0:
self._check_tarball()
@@ -287,12 +285,12 @@ class Section:
tarball = self._config["chroot-tgz"]
if tarball:
create_or_replace_chroot_tgz(self._config, tarball,
- self._base_tgz_ctrl, self._config["distro"])
+ self._config["distro"])
tarball = self._config["upgrade-test-chroot-tgz"]
if self._config["upgrade-test-distros"] and tarball:
create_or_replace_chroot_tgz(self._config, tarball,
- self._base_tgz_ctrl, self._config["upgrade-test-distros"].split()[0])
+ self._config["upgrade-test-distros"].split()[0])
os.chdir(oldcwd)
@@ -559,11 +557,11 @@ def create_chroot(config, tarball, distro):
if os.path.exists(tarball + ".new"):
os.rename(tarball + ".new", tarball)
-def create_or_replace_chroot_tgz(config, tgz, tgz_ctrl, distro):
+def create_or_replace_chroot_tgz(config, tgz, distro):
forced = 0
if os.path.exists(tgz):
- max_tgz_age = tgz_ctrl[0]
- min_tgz_retry_delay = tgz_ctrl[1]
+ max_tgz_age = int(config["max-tgz-age"])
+ min_tgz_retry_delay = int(config["min-tgz-retry-delay"])
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