[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.51

Holger Levsen holger at layer-acht.org
Wed May 15 10:10:06 UTC 2013


The following commit has been merged in the master branch:
commit f243d16a5af840405288eb0f13ebcbfc9b02eff6
Author: Andreas Beckmann <anbe at debian.org>
Date:   Fri May 10 03:18:09 2013 +0200

    lib/conf.py: add _is_virtual() method
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>

diff --git a/piupartslib/conf.py b/piupartslib/conf.py
index 073f7d9..68a8fbd 100644
--- a/piupartslib/conf.py
+++ b/piupartslib/conf.py
@@ -137,6 +137,10 @@ class DistroConfig(UserDict.UserDict):
             return self[section][key]
         return self[section]
 
+    def _is_virtual(self, distro):
+        uri = self.get(distro, "uri")
+        return uri is not None and uri == "None"
+
     def get_mirror(self, distro):
         return self.get(distro, "uri") or self._mirror
 
@@ -161,7 +165,7 @@ class DistroConfig(UserDict.UserDict):
             return ["-t", tr]
         return []
 
-    def _expand_depends(self, distro):
+    def _expand_depends(self, distro, virtual=True):
         todo = [distro]
         done = []
         seen = []
@@ -173,7 +177,8 @@ class DistroConfig(UserDict.UserDict):
                 todo = done + (self.get(curr, "depends") or "").split() + [ curr ] + todo
                 done = []
             elif not curr in done:
-                done.append(curr)
+                if virtual or not self._is_virtual(curr):
+                    done.append(curr)
         return done
 
     def get_deb_lines(self, distro, components):

-- 
piuparts git repository



More information about the Piuparts-commits mailing list