public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: SebastianLuther@gmx.de
To: gentoo-portage-dev@lists.gentoo.org
Subject: [gentoo-portage-dev] [PATCH 1/2] portdbapi.cp_list(): Don't write into xmatch's "match-all" cache
Date: Wed,  1 Jan 2014 23:14:10 +0100	[thread overview]
Message-ID: <1388614451-18197-1-git-send-email-SebastianLuther@gmx.de> (raw)

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



             reply	other threads:[~2014-01-01 22:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-01 22:14 SebastianLuther [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388614451-18197-1-git-send-email-SebastianLuther@gmx.de \
    --to=sebastianluther@gmx.de \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox