[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.49-167-gc2d72c8
Andreas Beckmann
anbe at debian.org
Thu Mar 7 11:00:09 UTC 2013
The following commit has been merged in the develop branch:
commit 5120c6b18276fc78ac2f8b38d6903dd8cd192b54
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Mar 3 23:06:50 2013 +0100
p-s: add basetgz-directory setting and _get_tarball() method
Signed-off-by: Andreas Beckmann <anbe at debian.org>
diff --git a/README.txt b/README.txt
index d7b65a8..d92660f 100644
--- a/README.txt
+++ b/README.txt
@@ -589,6 +589,10 @@ section, too, and will serve as defaults for all other sections
the tarball to keep the chroot for the basic install/purge
testing. If the tarball doesn't exist, the slave creates it.
+* "basetgz-directory" is the directory where "chroot-tgz" (or the
+ automatically selected default name) is located. The default is
+ '.'.
+
* "upgrade-test-distros" is the space delimited list of
distributions the slave should use for testing upgrades
between distributions (i.e., Debian versions). Using "partial"
diff --git a/debian/changelog b/debian/changelog
index cbe2014..29ab3f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,7 @@ piuparts (0.50) UNRELEASED; urgency=low
+ slave-load-max
- New per-section settings:
+ depends-sections
+ + basetgz-directory
- Setting tmpdir is now mandatory for master/slave operation.
* distros.conf:
- New configuration file to describe full distributions (e.g. sid,
diff --git a/piuparts-slave.py b/piuparts-slave.py
index fc55e42..b348631 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -87,6 +87,7 @@ class Config(piupartslib.conf.Config):
"chroot-tgz": None,
"upgrade-test-distros": None,
"upgrade-test-chroot-tgz": None,
+ "basetgz-directory": ".",
"max-reserved": 1,
"debug": "no",
"keep-sources-list": "no",
@@ -316,6 +317,8 @@ class Section:
def __init__(self, section):
self._config = Config(section=section, defaults_section="global")
self._config.read(CONFIG_FILE)
+ self._distro_config = piupartslib.conf.DistroConfig(
+ DISTRO_CONFIG_FILE, self._config["mirror"])
self._error_wait_until = 0
self._idle_wait_until = 0
self._recycle_wait_until = 0
@@ -378,6 +381,12 @@ class Section:
if recycle:
self._slave.enable_recycling()
+
+ def _get_tarball(self):
+ basetgz = self._config["chroot-tgz"] or \
+ self._distro_config.get_basetgz(self._config.get_start_distro())
+ return os.path.join(self._config["basetgz-directory"], basetgz)
+
def _check_tarball(self):
oldcwd = os.getcwd()
os.chdir(self._slave_directory)
--
piuparts git repository
More information about the Piuparts-commits
mailing list