From 66c4d613b4c2e9d51026dfb7688729abc5763897 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 19 Dec 2006 07:16:32 +0000 Subject: [PATCH] Increase cache hits in portdbapi.xmatch(). svn path=/main/trunk/; revision=5323 --- pym/portage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- 2.26.2