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

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


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