Fix the code from the previous commit so that it doesn't try to pull
authorZac Medico <zmedico@gentoo.org>
Fri, 11 Apr 2008 20:23:01 +0000 (20:23 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 11 Apr 2008 20:23:01 +0000 (20:23 -0000)
USE from a portdbapi instance (like when called by repoman) since
portdbapi doesn't return USE in aux_get() calls.

svn path=/main/trunk/; revision=9840

pym/portage/__init__.py

index b5227b1e03e61e891b1222c075ca77b668730935..7ec4b95d915257f773dec6406b56c07d82a3f7a2 100644 (file)
@@ -5366,9 +5366,14 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                for y in pkgs:
                        cpv, pv_split, db = y
                        depstring = " ".join(db.aux_get(cpv, dep_keys))
-                       use_split = db.aux_get(cpv, ["USE"])[0].split()
                        pkg_kwargs = kwargs.copy()
-                       pkg_kwargs["myuse"] = use_split
+                       if isinstance(db, portdbapi):
+                               # for repoman
+                               pass
+                       else:
+                               # for emerge
+                               use_split = db.aux_get(cpv, ["USE"])[0].split()
+                               pkg_kwargs["myuse"] = use_split
                        if edebug:
                                print "Virtual Parent:   ", y[0]
                                print "Virtual Depstring:", depstring