On 04/27/2012 12:25 PM, Jonathan Callen wrote:
> On 04/27/2012 11:26 AM, Zac Medico wrote:
>> In order to be practical, I guess we'd have to add a constraint
>> which says that if KEYWORDS contains the stable variant of a
>> particular keyword, then it should also be considered to implicitly
>> contain the unstable variant when the package manager is deciding
>> whether or not to apply package.use.{mask,force}.
>
>> So, here's a description of the whole algorithm that I'd use:
>
>> 1) Let EFFECTIVE_KEYWORDS equal the set of values contained in
>> KEYWORDS, plus ** and all the unstable variants of the stable
>> values contained in KEYWORDS. For example:
>
>> KEYWORDS="~amd64 x86" -> EFFECTIVE_KEYWORDS="~amd64 x86 ** ~x86"
>
>> 2) Intersect EFFECTIVE_KEYWORDS with effective ACCEPT_KEYWORDS,
>> where effective ACCEPT_KEYWORDS includes any relevant values from
>> package.accept_keywords. For example, here is a table of
>> intersections of EFFECTIVE_KEYWORDS="~amd64 x86 ** ~x86" with
>> various effective ACCEPT_KEYWORDS values:
>
>> ACCEPT_KEYWORDS | INTERSECTION | package.stable
>> ----------------------------------------------------- x86
>> | x86 | yes x86 ~x86 | x86 ~x86 | no **
>> | ** | no amd64 ~amd64 | ~amd64 | no
>
>> 3) Apply package.stable settings if INTERSECTION contains only
>> stable keywords. For example, see the package.stable column in the
>> table above.
>
> This algorithm better matches what I meant in my earlier posting, so
> +1 from me. (And if anyone has an ACCEPT_KEYWORDS value of "~amd64
> -amd64", they deserve any issues that may arise).
>
> The only issue I have with it is that EFFECTIVE_KEYWORDS should be
> expanded to contain "*" if any stable keyword is present and "~*" if
> any unstable keyword is present (or "*" and "~*" in ACCEPT_KEYWORDS
> should be pre-expanded).
Yeah, I omitted * and ~* for brevity, and you've got the right idea.
--
Thanks,
Zac
|