Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Feature request: package.use.stable.mask and package.use.stable.force
Date: Fri, 27 Apr 2012 19:37:34
Message-Id: 4F9AF537.3000603@gentoo.org
In Reply to: [gentoo-dev] Re: Feature request: package.use.stable.mask and package.use.stable.force by Jonathan Callen
1 On 04/27/2012 12:25 PM, Jonathan Callen wrote:
2 > On 04/27/2012 11:26 AM, Zac Medico wrote:
3 >> In order to be practical, I guess we'd have to add a constraint
4 >> which says that if KEYWORDS contains the stable variant of a
5 >> particular keyword, then it should also be considered to implicitly
6 >> contain the unstable variant when the package manager is deciding
7 >> whether or not to apply package.use.{mask,force}.
8 >
9 >> So, here's a description of the whole algorithm that I'd use:
10 >
11 >> 1) Let EFFECTIVE_KEYWORDS equal the set of values contained in
12 >> KEYWORDS, plus ** and all the unstable variants of the stable
13 >> values contained in KEYWORDS. For example:
14 >
15 >> KEYWORDS="~amd64 x86" -> EFFECTIVE_KEYWORDS="~amd64 x86 ** ~x86"
16 >
17 >> 2) Intersect EFFECTIVE_KEYWORDS with effective ACCEPT_KEYWORDS,
18 >> where effective ACCEPT_KEYWORDS includes any relevant values from
19 >> package.accept_keywords. For example, here is a table of
20 >> intersections of EFFECTIVE_KEYWORDS="~amd64 x86 ** ~x86" with
21 >> various effective ACCEPT_KEYWORDS values:
22 >
23 >> ACCEPT_KEYWORDS | INTERSECTION | package.stable
24 >> ----------------------------------------------------- x86
25 >> | x86 | yes x86 ~x86 | x86 ~x86 | no **
26 >> | ** | no amd64 ~amd64 | ~amd64 | no
27 >
28 >> 3) Apply package.stable settings if INTERSECTION contains only
29 >> stable keywords. For example, see the package.stable column in the
30 >> table above.
31 >
32 > This algorithm better matches what I meant in my earlier posting, so
33 > +1 from me. (And if anyone has an ACCEPT_KEYWORDS value of "~amd64
34 > -amd64", they deserve any issues that may arise).
35 >
36 > The only issue I have with it is that EFFECTIVE_KEYWORDS should be
37 > expanded to contain "*" if any stable keyword is present and "~*" if
38 > any unstable keyword is present (or "*" and "~*" in ACCEPT_KEYWORDS
39 > should be pre-expanded).
40
41 Yeah, I omitted * and ~* for brevity, and you've got the right idea.
42 --
43 Thanks,
44 Zac