summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-09 09:26:49 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-09 09:26:49 +0000
commit757a424094dae1c44f07d28bc8368a7574392d66 (patch)
treebda935136b6000e1ebc7f3b3e60844686ffb5abe /pym
parentdf43103d0dd5be8a96ff61476c97fa0209deb712 (diff)
downloadportage-757a424094dae1c44f07d28bc8368a7574392d66.tar.gz
portage-757a424094dae1c44f07d28bc8368a7574392d66.tar.bz2
portage-757a424094dae1c44f07d28bc8368a7574392d66.zip
Properly exclude old-style virtuals from the portdbapi.cp_list() cache.
svn path=/main/trunk/; revision=8010
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/porttree.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index d47f6fd9d..d6fd4a172 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -501,7 +501,8 @@ class portdbapi(dbapi):
def cp_list(self, mycp, use_cache=1, mytree=None):
if self.frozen and mytree is None:
mylist = self.xcache["match-all"].get(mycp)
- if mylist is not None:
+ # cp_list() doesn't expand old-style virtuals
+ if mylist and mylist[0].startswith(mycp):
return mylist[:]
mysplit = mycp.split("/")
invalid_category = mysplit[0] not in self._categories
@@ -527,7 +528,8 @@ class portdbapi(dbapi):
else:
mylist = d.keys()
if self.frozen and mytree is None:
- self.xcache["match-all"][mycp] = mylist[:]
+ if not (not mylist and mycp.startswith("virtual/")):
+ self.xcache["match-all"][mycp] = mylist[:]
return mylist
def freeze(self):