From: Zac Medico Date: Fri, 12 Oct 2007 06:25:26 +0000 (-0000) Subject: Properly exclude old-style virtuals from the X-Git-Tag: v2.1.3.16~47 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a6664c92c561ae1322837ad8d89c3eeb3b0428f5;p=portage.git Properly exclude old-style virtuals from the portdbapi.cp_list() cache. (trunk r8010) svn path=/main/branches/2.1.2/; revision=8068 --- diff --git a/pym/portage.py b/pym/portage.py index 3edc5296a..b7ca0a4a4 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6479,7 +6479,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 @@ -6505,7 +6506,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):