public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH 1/2] portdbapi.cp_list(): Don't write into xmatch's "match-all" cache
Date: Wed, 01 Jan 2014 15:29:34 -0800	[thread overview]
Message-ID: <1388618974.3753.0.camel@big_daddy.dol-sen.ca> (raw)
In-Reply-To: <1388616386-28967-1-git-send-email-SebastianLuther@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]

On Wed, 2014-01-01 at 23:46 +0100, SebastianLuther@gmx.de wrote:
> 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 | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
> index fc3fc03..53b9648 100644
> --- a/pym/portage/dbapi/porttree.py
> +++ b/pym/portage/dbapi/porttree.py
> @@ -741,10 +741,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
> @@ -796,7 +792,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):

Sounds correct to me.  Anyone object to committing this?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

      reply	other threads:[~2014-01-01 23:29 UTC|newest]

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

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=1388618974.3753.0.camel@big_daddy.dol-sen.ca \
    --to=dolsen@gentoo.org \
    --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