summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-03 01:17:59 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-03 01:17:59 +0000
commita2144da08c8521262cd1c8e936705493afd650f4 (patch)
tree3b4635b125b0a331df906700d015dac74da23a2a
parent7bb3bcea25eaaf8eac7c3b7b1d866de706c7e80f (diff)
downloadportage-a2144da08c8521262cd1c8e936705493afd650f4.tar.gz
portage-a2144da08c8521262cd1c8e936705493afd650f4.tar.bz2
portage-a2144da08c8521262cd1c8e936705493afd650f4.zip
In cpv_expand(), if the virtuals file contains a versioned atom (like
the base profile currently has for virtual/pam), properly remove the operator and version from the atom before it is passed into dbapi.cp_list(). svn path=/main/trunk/; revision=9683
-rw-r--r--pym/portage/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index ef2d65f0c..a64e90c5c 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -5680,7 +5680,11 @@ def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
writemsg("virts[%s]: %s\n" % (str(mykey),virts[mykey]), 1)
mykey_orig = mykey[:]
for vkey in virts[mykey]:
- if mydb.cp_list(vkey,use_cache=use_cache):
+ # The virtuals file can contain a versioned atom, so
+ # it may be necessary to remove the operator and
+ # version from the atom before it is passed into
+ # dbapi.cp_list().
+ if mydb.cp_list(dep_getkey(vkey), use_cache=use_cache):
mykey = vkey
writemsg("virts chosen: %s\n" % (mykey), 1)
break