public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH 1/2] portdbapi.cp_list(): Don't write into xmatch's "match-all" cache
@ 2014-01-01 22:14 SebastianLuther
  2014-01-01 22:14 ` [gentoo-portage-dev] [PATCH 2/2] repoman: Add check for missing slot operators (bug 493742) SebastianLuther
  2014-01-01 22:46 ` [gentoo-portage-dev] [PATCH 1/2] portdbapi.cp_list(): Don't write into xmatch's "match-all" cache SebastianLuther
  0 siblings, 2 replies; 8+ messages in thread
From: SebastianLuther @ 2014-01-01 22:14 UTC (permalink / raw
  To: gentoo-portage-dev

From: Sebastian Luther <SebastianLuther@gmx.de>

xmatch returns _pkg_str instances these days. They require metadata
access, which cp_list doesn't have. That means that writing cp_list
results into the xmatch cache breaks xmatch users that expect _pkg_str
instances with full metadata.
---
 pym/portage/dbapi/porttree.py | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index fc3fc03..62ac75c 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -740,12 +740,6 @@ class portdbapi(dbapi):
 
 		if self.frozen and mytree is None:
 			cachelist = self.xcache["cp-list"].get(mycp)
-			if cachelist is not None:
-				# Try to propagate this to the match-all cache here for
-				# repoman since he uses separate match-all caches for each
-				# profile (due to differences in _get_implicit_iuse).
-				self.xcache["match-all"][(mycp, mycp)] = cachelist
-				return cachelist[:]
 		mysplit = mycp.split("/")
 		invalid_category = mysplit[0] not in self._categories
 		d={}
@@ -796,7 +790,6 @@ class portdbapi(dbapi):
 		if self.frozen and mytree is None:
 			cachelist = mylist[:]
 			self.xcache["cp-list"][mycp] = cachelist
-			self.xcache["match-all"][(mycp, mycp)] = cachelist
 		return mylist
 
 	def freeze(self):
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-02  9:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-01 22:14 [gentoo-portage-dev] [PATCH 1/2] portdbapi.cp_list(): Don't write into xmatch's "match-all" cache SebastianLuther
2014-01-01 22:14 ` [gentoo-portage-dev] [PATCH 2/2] repoman: Add check for missing slot operators (bug 493742) SebastianLuther
2014-01-01 23:30   ` Brian Dolbec
2014-01-02  8:50   ` [gentoo-portage-dev] " Ryan Hill
2014-01-02  9:24   ` [gentoo-portage-dev] SebastianLuther
2014-01-02  9:24     ` [gentoo-portage-dev] [PATCH] repoman: Add check for missing slot operators (bug 493742) SebastianLuther
2014-01-01 22:46 ` [gentoo-portage-dev] [PATCH 1/2] portdbapi.cp_list(): Don't write into xmatch's "match-all" cache SebastianLuther
2014-01-01 23:29   ` Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox