[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.50-174-ga23da25

Holger Levsen holger at layer-acht.org
Mon May 13 14:09:09 UTC 2013


The following commit has been merged in the develop branch:
commit 51794c9f484eef221538539a8f61dda35d3bf62c
Author: Andreas Beckmann <anbe at debian.org>
Date:   Fri May 10 01:56:59 2013 +0200

    p-s: include arch in the default tarball name
    
    allows running both amd64 and i386 on the same slave with minimal configuration
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/debian/changelog b/debian/changelog
index eebf38c..a8aaba6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -42,6 +42,7 @@ piuparts (0.51) UNRELEASED; urgency=low
       to sleep, and after communication errors.
     - Support empty master-command if the command is set in master's
       .ssh/authorized_keys file.
+    - Change default basetgz name to {DISTRO}_{ARCH}.tar.gz.
   * piuparts-analyze.py:
   * piuparts-report.py:
     - Skip sections that don't exist in piuparts.conf.
diff --git a/piuparts-slave.py b/piuparts-slave.py
index 95956dd..86b3c71 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -401,7 +401,8 @@ class Section:
 
     def _get_tarball(self):
         basetgz = self._config["chroot-tgz"] or \
-                self._distro_config.get_basetgz(self._config.get_start_distro())
+                self._distro_config.get_basetgz(self._config.get_start_distro(),
+                                                self._config.get_arch())
         return os.path.join(self._config["basetgz-directory"], basetgz)
 
     def _check_tarball(self):
diff --git a/piupartslib/conf.py b/piupartslib/conf.py
index c36a6e1..073f7d9 100644
--- a/piupartslib/conf.py
+++ b/piupartslib/conf.py
@@ -189,14 +189,14 @@ class DistroConfig(UserDict.UserDict):
                         c))
         return lines
 
-    def get_basetgz(self, distro):
+    def get_basetgz(self, distro, arch):
         # look for the first base distribution
         for d in self._expand_depends(distro):
             if not self[d]["uri"] is None and self[d]["uri"] == "None":
                 next  # skip virtual section
             if self.get(d, "depends"):
                 next  # skip partial distro
-            return self.get_distribution(d) + ".tar.gz"
+            return "%s_%s.tar.gz" % (self.get_distribution(d), arch)
         return None
 
 

-- 
piuparts git repository



More information about the Piuparts-commits mailing list