summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-16 23:49:10 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-16 23:49:10 +0000
commitfb0445ca2f93a9b049717def6e045272e1322935 (patch)
treef0e195a999bb8e661aabca60498750b470230532
parent889a96a3cf5563a5e846d88c8f4ea8bfe3026c4d (diff)
downloadportage-fb0445ca2f93a9b049717def6e045272e1322935.tar.gz
portage-fb0445ca2f93a9b049717def6e045272e1322935.tar.bz2
portage-fb0445ca2f93a9b049717def6e045272e1322935.zip
For --usepkgonly, allow _expand_new_virtuals() to fall back to the vardb in case all binaries aren't available.
svn path=/main/trunk/; revision=5682
-rw-r--r--pym/portage.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 0b9c1f3a7..31be26307 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -3917,7 +3917,15 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
for cpv in portdb.match(match_atom):
# only use new-style matches
if cpv.startswith("virtual/"):
- pkgs.append((cpv, pkgsplit(cpv)))
+ pkgs.append((cpv, pkgsplit(cpv), portdb))
+ if kwargs["use_binaries"] and "vartree" in trees[myroot]:
+ vardb = trees[myroot]["vartree"].dbapi
+ for cpv in vardb.match(match_atom):
+ # only use new-style matches
+ if cpv.startswith("virtual/"):
+ if cpv in pkgs:
+ continue
+ pkgs.append((cpv, pkgsplit(cpv), vardb))
if not (pkgs or mychoices):
# This one couldn't be expanded as a new-style virtual. Old-style
# virtuals have already been expanded by dep_virtual, so this one
@@ -3935,7 +3943,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
else:
a = ['||']
for y in pkgs:
- depstring = " ".join(portdb.aux_get(y[0], dep_keys))
+ depstring = " ".join(y[2].aux_get(y[0], dep_keys))
if edebug:
print "Virtual Parent: ", y[0]
print "Virtual Depstring:", depstring