[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 9d70d52e2b1f1b4c62111034969838a9f5f4f653
Author: Andreas Beckmann <anbe at debian.org>
Date:   Mon Mar 4 01:06:39 2013 +0100

    p-s: use the _get_tarball() method
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/README.txt b/README.txt
index d92660f..795fe80 100644
--- a/README.txt
+++ b/README.txt
@@ -586,8 +586,10 @@ section, too, and will serve as defaults for all other sections
  --print-architecture.
 
 * "chroot-tgz" is the name of the file the slave should use for
- the tarball to keep the chroot for the basic install/purge
- testing. If the tarball doesn't exist, the slave creates it.
+ the tarball containing the base chroot. The default name is
+ generated automatically from the "distro" or "upgrade-test-distros"
+ setting.  Overriding the default should no longer be necceessary.
+ 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
diff --git a/piuparts-slave.py b/piuparts-slave.py
index b348631..d8e4a65 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -330,9 +330,6 @@ class Section:
             self._logger = logging.getLogger()
             self._logger.setLevel(logging.DEBUG)
 
-        if self._config["chroot-tgz"] and not self._config["distro"]:
-          logging.info("The option --chroot-tgz needs --distro.")
-
         if int(self._config["max-reserved"]) > 0:
             self._check_tarball()
 
@@ -391,10 +388,8 @@ class Section:
         oldcwd = os.getcwd()
         os.chdir(self._slave_directory)
 
-        tarball = self._config["chroot-tgz"]
-        if tarball:
-            create_or_replace_chroot_tgz(self._config, tarball,
-                                         self._config.get_distro())
+        create_or_replace_chroot_tgz(self._config, self._get_tarball(),
+                                     self._config.get_start_distro())
 
         tarball = self._config["upgrade-test-chroot-tgz"]
         if self._config["upgrade-test-distros"] and tarball:
@@ -597,13 +592,6 @@ class Section:
         distupgrade = len(self._config.get_distros()) > 1
         ret = 0
 
-        if not distupgrade:
-            basetgz = self._config["chroot-tgz"]
-        else:
-            basetgz = self._config["upgrade-test-chroot-tgz"]
-        if not basetgz:
-            ret = -11111
-
         command = self._config["piuparts-command"].split()
         if self._config["piuparts-flags"]:
             command.extend(self._config["piuparts-flags"].split())
@@ -613,7 +601,7 @@ class Section:
             command.extend(["--mirror", self._config["mirror"]])
         if self._config["tmpdir"]:
             command.extend(["--tmpdir", self._config["tmpdir"]])
-        command.extend(["-b", basetgz])
+        command.extend(["-b", self._get_tarball()])
         if not distupgrade:
             command.extend(["-d", self._config.get_distro()])
             command.append("--no-upgrade-test")

-- 
piuparts git repository



More information about the Piuparts-commits mailing list