1 |
On Wed, 12 Aug 2015 13:06:43 -0400 |
2 |
Ian Stakenvicius <axs@g.o> wrote: |
3 |
|
4 |
> -----BEGIN PGP SIGNED MESSAGE----- |
5 |
> Hash: SHA256 |
6 |
> |
7 |
> On 12/08/15 01:05 PM, Ian Stakenvicius wrote: |
8 |
> > On 12/08/15 01:00 PM, Alexis Ballier wrote: |
9 |
> >> On Wed, 12 Aug 2015 12:57:25 -0400 Ian Stakenvicius |
10 |
> >> <axs@g.o> wrote: |
11 |
> > |
12 |
> >>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 |
13 |
> >>> |
14 |
> >>> On 12/08/15 12:42 PM, Ulrich Mueller wrote: |
15 |
> >>>> On Wed, 12 Aug 2015, Ian Stakenvicius wrote: |
16 |
> >>>>> 2 - is there a particular reasoning for the - in front |
17 |
> >>>>> of qt4 here? I only ask because it would seem that a |
18 |
> >>>>> single default-enable should suffice in lists like this |
19 |
> >>>>> to indicate a resolution path, no? That is, '^^ ( +flag1 |
20 |
> >>>>> -flag2 -flag3 -flag4 )' to me seems like it would be the |
21 |
> >>>>> same as '^^ ( +flag1 flag2 flag3 flag4 )' |
22 |
> >>>> |
23 |
> >>>> If the user has both "qt4 qt5", then enabling qt5 alone |
24 |
> >>>> won't help to resolve "^^ ( qt5 qt4 )". |
25 |
> >>>> |
26 |
> >>> |
27 |
> >>> Right, but the PM knows based on a particular REQUIRED_USE |
28 |
> >>> operator what it would need to do when a particular flag is |
29 |
> >>> set to default. Given '^^' is must-be-one-of, the +flag would |
30 |
> >>> be enabled and all the other flags would be disabled, right? |
31 |
> >>> |
32 |
> >>> Here's how I'd see it mapping out: |
33 |
> >>> |
34 |
> >>> || ( +flag1 flag2 ... ) , PM only forces-on flag1 ^^ ( |
35 |
> >>> +flag1 flag2 ... ) , PM forces-on flag1, forces-off all |
36 |
> >>> others ?? ( +flag2 flag2 ... ) , PM forces off all but flag1 |
37 |
> >>> |
38 |
> >>> I'm not sure if the following make sense though... thoughts? |
39 |
> >>> |
40 |
> >>> {,!}flag1? ( +flag2 ) , PM forces-on flag2 {,!}flag1? ( |
41 |
> >>> +!flag2 ) , PM forces !flag2, meaning forces-off flag2 |
42 |
> >>> |
43 |
> >>> |
44 |
> >>> I'm just wondering if it's really necessary in terms of |
45 |
> >>> syntax to specify the flag-negation that the PM would need to |
46 |
> >>> do. |
47 |
> > |
48 |
> > |
49 |
> >> See my other email: neither + nor - are necessary :) |
50 |
> > |
51 |
> > |
52 |
> > |
53 |
> > |
54 |
> > I'd disagree on that -- technically they aren't necessary, but |
55 |
> > the whole reason why these new operators were added in the first |
56 |
> > place was so that it's a lot easier for developers to fill in |
57 |
> > REQUIRED_USE and get the logic right. Mapping out a ^^ ( flag1 |
58 |
> > flag2 flag3 flag4 ) into all of its permissible flag-a? ( flagb |
59 |
> > !flagc !flagd ) variants is a royal pain. Plus there's |
60 |
> > readability/understandability to consider here. |
61 |
> > |
62 |
> |
63 |
> err, flaga? ( !flagb !flagc !flagd ) i mean.. |
64 |
|
65 |
It is indeed longer (n flags to roughly n² flags expanded i'd say), but |
66 |
i disagree on the readability: i find it much more readable as "if |
67 |
flaga is enabled then flagb, flagc and flagd must be disabled" etc. |
68 |
which express clearly the preference than "exactly one of flaga flagb |
69 |
flagc flagd except if there is a problem then flaga but not the others". |
70 |
|
71 |
Also, there's something we've overseen with the +/- syntax: What about |
72 |
"^^ ( +flaga -flagb -flagc -flagd )" with USE="-flaga flagb flagc" ? |
73 |
The only way to solve it would be USE="flaga -flagb -flagc" while the |
74 |
"implication syntax" could give you USE="-flaga flagb -flagc" (or any |
75 |
other preference of the ebuild writer). |
76 |
|
77 |
Finally, about getting the logic right, since it's a subset of the |
78 |
current syntax I don't think that should be a problem :) |
79 |
|
80 |
Alexis. |