1 |
On 09/12/13 08:56, Alan McKinnon wrote: |
2 |
> On 09/12/2013 08:25, Nikos Chantziaras wrote: |
3 |
>> There are some global USE flags that allow users to pick alternative |
4 |
>> methods of implementing the same thing. For example, packages that offer |
5 |
>> a GUI might do so through the "qt" or "gtk" USE flag. Or audio support, |
6 |
>> where you can choose "alsa" or "pulseaudio". |
7 |
>> |
8 |
>> Now, if I wanted to, for example, always choose PulseAudio support |
9 |
>> instead of ALSA and a Qt GUI instead of a Gtk+ one, one would think that |
10 |
>> I could just do: |
11 |
>> |
12 |
>> USE="pulseaudio qt -alsa -gtk" |
13 |
>> |
14 |
>> in my make.conf. But, that doesn't work. [...] |
15 |
>> |
16 |
>> So what's needed here, is a way to tell Portage to only disable a global |
17 |
>> USE flag for packages that also offer another one, specified by the |
18 |
>> user. Like this pseudo make.conf syntax: |
19 |
>> |
20 |
>> USE="pulseaudio pulseaudio?(-alsa) qt qt?(-gtk)" |
21 |
>> |
22 |
>> There should be a proper way of doing this. |
23 |
> |
24 |
> There is no extant way to do what you want to do. USE flags operate in |
25 |
> isolation and their end result is strictly limited to their own scope. |
26 |
> |
27 |
> Doing what you suggest leads to horrible breakage as the flag is no |
28 |
> longer doing what you think it is doing, it is now possibly doing |
29 |
> something quite different. |
30 |
|
31 |
But it's already possible to do this through package.use. All I'm asking |
32 |
for is support for doing this in an automated way, without me needing to |
33 |
set USE flags in package.use for each package individually. |
34 |
|
35 |
Also, what exactly would this break? I can't think of any breakage |
36 |
because of this. |
37 |
|
38 |
|
39 |
> Portage is already doing this properly. |
40 |
|
41 |
It's not doing it at all. |
42 |
|
43 |
|
44 |
> The correct way to deal with this (if there is such a thing) is in the |
45 |
> package's own build system. That so few do such things is in itself telling. |
46 |
|
47 |
That would be against Gentoo policy. Packages should offer build time |
48 |
configurations options for this, they shouldn't introduce automagic deps |
49 |
by checking what's available on your system. And that wouldn't work |
50 |
anyway; PulseAudio needs ALSA, so the build system would detect it anyway. |