Gentoo Archives: gentoo-dev

From: Maurice van der Pot <griffon26@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] GLEP 29 (USE Flag Grouping) with -@GROUP goodness
Date: Mon, 25 Oct 2004 21:57:41
Message-Id: 20041025215731.GB25723@kfk4ever.com
In Reply to: Re: [gentoo-dev] GLEP 29 (USE Flag Grouping) with -@GROUP goodness by Maurice van der Pot
1 Hi again,
2
3 Because several people have said on irc that my proposal is too complicated
4 but I have not been presented with any concrete examples that demonstrate
5 this complexity, here is a short overview:
6
7 ----------------------------------
8
9 Assuming empty defaults:
10
11 USE="flag1" flag1 is set
12 USE="-flag1" no flags are set
13 USE="flag1 -flag1" no flags are set
14 USE="-flag1 flag1" flag1 is set
15
16 GROUP1="$commonflag flag1 flag2" group contains $commonflag, flag1 and flag2
17 GROUP2="$commonflag flag2 flag3" group contains $commonflag, flag2 and flag3
18 GROUP3="@GROUP2 -flag3" group contains $commonflag and flag2
19
20 USE="@GROUP1" commonflag, flag1 and flag2 are set
21 USE="@GROUP1 -@GROUP2" commonflag and flag1 are set
22 USE="@GROUP2 -@GROUP3" commonflag and flag3 are set
23
24 If the defaults are not empty, the starting point will simply be those
25 flags.
26
27 ----------------------------------
28
29 I must retract my earlier statement that this would be order independent.
30 The flags are interpreted left to right.
31
32 Some basic properties:
33 - the only difference is that some flags are marked (in this example with $)
34 - marked flags are left out when expanding the group if the group is negated
35 - groups can be fully expanded when parsed and will not contain any negative parts after parsing
36
37 And before any of you start ripping out wc -l, I'd like to point out that
38 the complexity that we should be avoiding is in two areas: the code that
39 is needed to implement it and the use of these flags by developers and
40 users. I've heard things ranging from the need for a solid grasp on set theory
41 to the introduction of new syntax as reasons why this would be too complex.
42 I disagree with that, but please prove me wrong by giving some examples
43 or some other kind of explanation of this complexity.
44
45 Maurice.
46
47 --
48 Maurice van der Pot
49
50 Gentoo Linux Developer griffon26@g.o http://www.gentoo.org
51 Creator of BiteMe! griffon26@××××××××.com http://www.kfk4ever.com