[Piuparts-devel] Get (virtual) package

Dave Steele dsteele at gmail.com
Tue Apr 9 13:51:34 UTC 2013


From: Andreas Beckmann <anbe at debian.org>
Date: Tue, Apr 9, 2013 at 5:47 AM
Subject: [Piuparts-commits] [SCM] piuparts git repository branch,
develop, updated. 0.50-78-g4d4af8d
To: piuparts-commits at lists.alioth.debian.org


-    def get_package(self, name, recurse=False):
+    def get_package(self, name, recurse=False, resolve_virtual=False):
         if name in self._packages:
             return self._packages[name]
         elif recurse:
             for db in self._dependency_databases:
                 if db.has_package(name):
                     return db.get_package(name)
+        elif resolve_virtual:
+            providers = self.get_providers(name, recurse=recurse)
+            if providers:
+                return self.get_package(providers[0],
recurse=recurse, resolve_virtual=False)
         return None

Are recurse and resolve_virtual mutually exclusive? I honestly don't know.



More information about the Piuparts-devel mailing list