[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.50-135-gb94736d

Andreas Beckmann anbe at debian.org
Fri May 10 10:59:05 UTC 2013


The following commit has been merged in the piatti branch:
commit c9e7f168f8e1c24377e3b342b8ff2e15edc2e52d
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