[Piuparts-commits] [piuparts] 03/06: p: resolve distro aliases in PIUPARTS_DISTRIBUTION

Holger Levsen holger at moszumanska.debian.org
Fri Jan 23 16:06:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 81006e53c6b89d3bec83a1b3784bb190bd09fbd3
Author: Andreas Beckmann <anbe at debian.org>
Date:   Fri Jan 23 14:54:45 2015 +0100

    p: resolve distro aliases in PIUPARTS_DISTRIBUTION
    
    custom scripts should not need to know anything about "stable" or "testing"
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 debian/changelog | 1 +
 piuparts.py      | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 849eacb..98661ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ piuparts (0.63) UNRELEASED; urgency=medium
       --no-install-recommends.
     - Mount /dev/pts into the chroot. Wanted by recent apt.
     - Fix usage of schroot with chroot names without ':'.  (Closes: #773874)
+    - Resolve distro aliases before setting PIUPARTS_DISTRIBUTION.
   * piuparts.conf:
     - Enable --warn-on-debsums-errors for all jessie tests.
     - Add new suite: jessie-pu (test only packages in jessie-proposed-updates).
diff --git a/piuparts.py b/piuparts.py
index 2893111..2a435dd 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1003,7 +1003,7 @@ class Chroot:
 
     def configure_chroot(self):
         """Configure a chroot according to current settings"""
-        os.environ["PIUPARTS_DISTRIBUTION"] = settings.debian_distros[0]
+        os.environ["PIUPARTS_DISTRIBUTION"] = settings.distro_config.get_distribution(settings.debian_distros[0])
         if not settings.keep_sources_list:
             self.create_apt_sources(settings.debian_distros[0])
         self.create_apt_conf()
@@ -1019,14 +1019,14 @@ class Chroot:
         """Upgrade a chroot installation to each successive distro."""
         for distro in distros:
             logging.debug("Upgrading %s to %s" % (self.name, distro))
-            os.environ["PIUPARTS_DISTRIBUTION_NEXT"] = distro
+            os.environ["PIUPARTS_DISTRIBUTION_NEXT"] = settings.distro_config.get_distribution(distro)
             self.create_apt_sources(distro)
             # Run custom scripts before upgrade
             self.run_scripts("pre_distupgrade")
             self.run(["apt-get", "update"])
             self.run(["apt-get", "-yf", "dist-upgrade"])
             os.environ["PIUPARTS_DISTRIBUTION_PREV"] = os.environ["PIUPARTS_DISTRIBUTION"]
-            os.environ["PIUPARTS_DISTRIBUTION"] = distro
+            os.environ["PIUPARTS_DISTRIBUTION"] = settings.distro_config.get_distribution(distro)
             # Sometimes dist-upgrade won't upgrade the packages we want
             # to test because the new version depends on a newer library,
             # and installing that would require removing the old version

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list