[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:10 UTC 2013


The following commit has been merged in the develop branch:
commit 96c25f2e525eac03c807cd8d4e5e12c88a85d5a5
Author: Andreas Beckmann <anbe at debian.org>
Date:   Fri May 10 09:46:01 2013 +0200

    lib/conf: exclude virtual distros from expanded list by default
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/debian/changelog b/debian/changelog
index 6e13627..35132e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ piuparts (0.51) UNRELEASED; urgency=low
     - Set testing = jessie and add jessie-proposed-updates.
   * piupartslib/conf.py:
     - Raise MissingSection if the requested section is not in piuparts.conf.
+    - Improve handling of virtual distros.
   * piupartslib/packagesdb.py:
     - get_package(): Add flag resolve_virtual, disabled by default.
   * Rename piuparts-master.py to piuparts-master-backend.py
diff --git a/piupartslib/conf.py b/piupartslib/conf.py
index 68a8fbd..8f07dab 100644
--- a/piupartslib/conf.py
+++ b/piupartslib/conf.py
@@ -165,7 +165,7 @@ class DistroConfig(UserDict.UserDict):
             return ["-t", tr]
         return []
 
-    def _expand_depends(self, distro, virtual=True):
+    def _expand_depends(self, distro, virtual=False):
         todo = [distro]
         done = []
         seen = []
@@ -179,13 +179,12 @@ class DistroConfig(UserDict.UserDict):
             elif not curr in done:
                 if virtual or not self._is_virtual(curr):
                     done.append(curr)
+        assert(len(done) > 0)
         return done
 
     def get_deb_lines(self, distro, components):
         lines = []
         for d in self._expand_depends(distro):
-            if not self[d]["uri"] is None and self[d]["uri"] == "None":
-                continue  # skip virtual section
             for c in components:
                 if self[d]["components"] is None or c in self[d]["components"].split():
                     lines.append("deb %s %s %s" % (
@@ -197,8 +196,6 @@ class DistroConfig(UserDict.UserDict):
     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 "%s_%s.tar.gz" % (self.get_distribution(d), arch)

-- 
piuparts git repository



More information about the Piuparts-commits mailing list