1 |
>>>>> On Wed, 12 Aug 2015, Ian Stakenvicius wrote: |
2 |
|
3 |
> On 12/08/15 11:08 AM, Ulrich Mueller wrote: |
4 |
>> I was thinking about some syntax like this: |
5 |
>> |
6 |
>> REQUIRED_USE="|| ( +foo bar ) ^^ ( +qt5 -qt4 )" |
7 |
>> |
8 |
>> The package manager would first evaluate each group in |
9 |
>> REQUIRED_USE with the original set of USE flags. If that doesn't |
10 |
>> evaluate to true, retry with flags changed as indicated by the + |
11 |
>> and - signs. |
12 |
|
13 |
> Having the ability for REQUIRED_USE to provide a default resolution |
14 |
> path should definitely help with things; I assume this is meant to |
15 |
> do its work via --autounmask-write or similar, ie to help users |
16 |
> adjust their config files? Or was the thought to allow PMs to |
17 |
> override USE immediately? |
18 |
|
19 |
In fact, I was thinking about overriding it immediately. It is the |
20 |
same as the ebuild explicitly picking a working default from |
21 |
conflicting flags, where there is also no user interaction required. |
22 |
(The PM should emit a warning, though.) |
23 |
|
24 |
> Questions: |
25 |
|
26 |
> 1 - how does +foo in REQUIRED_USE relate to use-defaults set in |
27 |
> IUSE? |
28 |
|
29 |
Apart from the similar syntax, they are not related. |
30 |
|
31 |
> 2 - is there a particular reasoning for the - in front of qt4 here? |
32 |
> I only ask because it would seem that a single default-enable |
33 |
> should suffice in lists like this to indicate a resolution path, no? |
34 |
> That is, '^^ ( +flag1 -flag2 -flag3 -flag4 )' to me seems like it |
35 |
> would be the same as '^^ ( +flag1 flag2 flag3 flag4 )' |
36 |
|
37 |
If the user has both "qt4 qt5", then enabling qt5 alone won't help to |
38 |
resolve "^^ ( qt5 qt4 )". |
39 |
|
40 |
> 3 - will having REQUIRED_USE be able to force flags on (and others |
41 |
> off) likely result in abuse of profiles and other use defaults? |
42 |
|
43 |
It wouldn't look for the origin of a USE flag setting in its input |
44 |
data. So, yes. |
45 |
|
46 |
> I forsee this being a way, for instance, for a dev to get around |
47 |
> users setting USE="-*" in make.conf to ensure a default use flag |
48 |
> setting is honoured. |
49 |
|
50 |
> 4 - Will a change to which flag the '+' is on likely to require a |
51 |
> revbump for VDB updates? |
52 |
|
53 |
I don't think so. For Portage users, it would be handled by --newuse, |
54 |
I guess. |
55 |
|
56 |
> For something like '^^ ( +qt4 qt5 )' I could see maintainers wanting |
57 |
> to switch which flag is default across a bunch of packages at once |
58 |
> when, say, the qt team wants qt5 to become the de-facto default. |
59 |
|
60 |
Ulrich |