summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-19 07:16:32 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-19 07:16:32 +0000
commit66c4d613b4c2e9d51026dfb7688729abc5763897 (patch)
tree93ddf275febec0c2337b8fb2e447f6a54118c17d
parentb25cd73c543c828e8711b1e890ca064911d7042d (diff)
downloadportage-66c4d613b4c2e9d51026dfb7688729abc5763897.tar.gz
portage-66c4d613b4c2e9d51026dfb7688729abc5763897.tar.bz2
portage-66c4d613b4c2e9d51026dfb7688729abc5763897.zip
Increase cache hits in portdbapi.xmatch().
svn path=/main/trunk/; revision=5323
-rw-r--r--pym/portage.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 6a2fb1cd7..984be5273 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5615,7 +5615,8 @@ class portdbapi(dbapi):
myval=match_from_list(mydep,mylist)
elif level=="match-visible":
#dep match -- find all visible matches
- myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep=mydep,mykey=mykey))
+ myval = match_from_list(mydep,
+ self.xmatch("list-visible", mykey, mydep=mykey, mykey=mykey))
#get all visible packages, then get the matching ones
elif level=="match-all":
#match *all* visible *and* masked packages
@@ -5629,6 +5630,8 @@ class portdbapi(dbapi):
if self.aux_get(cpv, ["SLOT"])[0] == myslot]
if self.frozen and (level not in ["match-list","bestmatch-list"]):
self.xcache[level][mydep]=myval
+ if origdep and origdep != mydep:
+ self.xcache[level][origdep] = myval
return myval
def match(self,mydep,use_cache=1):