Gentoo Archives: gentoo-dev

From: dev-random@××××.ru
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] USE flags requirements (EAPI-4 ?)
Date: Mon, 31 Aug 2009 15:40:47
Message-Id: 20090831204934.GA828@laptop
In Reply to: Re: [gentoo-dev] [RFC] USE flags requirements (EAPI-4 ?) by Ciaran McCreesh
1 On Mon, Aug 31, 2009 at 07:27:32PM +0100, Ciaran McCreesh wrote:
2 > Then when the user turns on all three:
3 >
4 > * If 'd' is enabled, if 'a' is enabled, 'b' must not be enabled
5 > * If 'd' is enabled, if 'a' is enabled, 'c' must not be enabled
6 > * If 'd' is enabled, if 'b' is enabled, 'a' must not be enabled
7 > * If 'd' is enabled, if 'b' is enabled, 'c' must not be enabled
8 > * If 'd' is enabled, if 'c' is enabled, 'a' must not be enabled
9 > * If 'd' is enabled, if 'c' is enabled, 'b' must not be enabled
10 >
11 > And in the general case, there's no way of translating the latter into
12 > the former.
13 >
14 > Much easier for everyone if you just say what you mean rather than
15 > converting it into some convoluted (but theoretically equivalent) less
16 > expressive syntax.
17
18 I suggest alternative syntax, less powerfull but more expressive:
19 groups of use-flags.
20
21 Guess we define the following flags in IUSE:
22 3d.nvidia 3d.ati 3d.intel
23 or
24 3d+nvidia 3d+ati 3d+intel
25 or
26 3d:nvidia 3d:ati 3d:intel
27
28 In first case we may enable any number of those flags.
29 In second case we must enable at least one of them.
30 In third case we must enable exactly one of them.
31 In all 3 cases, if (and only if) flag '3d' itself exist in IUSE,
32 those flags are ignored when it is unset.
33
34 For convenience, user may use '.' as middle-character in config in
35 all 3 cases (or, perhaps, even omit it and everything before it),
36 but in output of PM he will see proper character and understand
37 dependencies between flags without any explanation in English.
38
39 If we add flag which depends on nvidia (e.g. cg), we name it
40 3d.nvidia.cg, and it will be ignored (perhaps with warning) if flag
41 3d.nvidia is unset.

Replies

Subject Author
Re: [gentoo-dev] [RFC] USE flags requirements (EAPI-4 ?) Mounir Lamouri <volkmar@g.o>