From: Zac Medico Date: Tue, 19 Dec 2006 07:16:32 +0000 (-0000) Subject: Increase cache hits in portdbapi.xmatch(). X-Git-Tag: v2.1.2~271 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=66c4d613b4c2e9d51026dfb7688729abc5763897;p=portage.git Increase cache hits in portdbapi.xmatch(). svn path=/main/trunk/; revision=5323 --- 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):