Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
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 23:29:40
Message-Id: 1388618974.3753.0.camel@big_daddy.dol-sen.ca
In Reply to: [gentoo-portage-dev] [PATCH 1/2] portdbapi.cp_list(): Don't write into xmatch's "match-all" cache by SebastianLuther@gmx.de
1 On Wed, 2014-01-01 at 23:46 +0100, SebastianLuther@×××.de wrote:
2 > From: Sebastian Luther <SebastianLuther@×××.de>
3 >
4 > xmatch returns _pkg_str instances these days. They require metadata
5 > access, which cp_list doesn't have. That means that writing cp_list
6 > results into the xmatch cache breaks xmatch users that expect _pkg_str
7 > instances with full metadata.
8 > ---
9 > pym/portage/dbapi/porttree.py | 5 -----
10 > 1 file changed, 5 deletions(-)
11 >
12 > diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
13 > index fc3fc03..53b9648 100644
14 > --- a/pym/portage/dbapi/porttree.py
15 > +++ b/pym/portage/dbapi/porttree.py
16 > @@ -741,10 +741,6 @@ class portdbapi(dbapi):
17 > if self.frozen and mytree is None:
18 > cachelist = self.xcache["cp-list"].get(mycp)
19 > if cachelist is not None:
20 > - # Try to propagate this to the match-all cache here for
21 > - # repoman since he uses separate match-all caches for each
22 > - # profile (due to differences in _get_implicit_iuse).
23 > - self.xcache["match-all"][(mycp, mycp)] = cachelist
24 > return cachelist[:]
25 > mysplit = mycp.split("/")
26 > invalid_category = mysplit[0] not in self._categories
27 > @@ -796,7 +792,6 @@ class portdbapi(dbapi):
28 > if self.frozen and mytree is None:
29 > cachelist = mylist[:]
30 > self.xcache["cp-list"][mycp] = cachelist
31 > - self.xcache["match-all"][(mycp, mycp)] = cachelist
32 > return mylist
33 >
34 > def freeze(self):
35
36 Sounds correct to me. Anyone object to committing this?

Attachments

File name MIME type
signature.asc application/pgp-signature