On 09/12/13 08:56, Alan McKinnon wrote:
On 09/12/2013 08:25, Nikos Chantziaras wrote:
There are some global USE flags that allow users to pick alternative
methods of implementing the same thing. For example, packages that offer
a GUI might do so through the "qt" or "gtk" USE flag. Or audio support,
where you can choose "alsa" or "pulseaudio".

Now, if I wanted to, for example, always choose PulseAudio support
instead of ALSA and a Qt GUI instead of a Gtk+ one, one would think that
I could just do:

   USE="pulseaudio qt -alsa -gtk"

in my make.conf. But, that doesn't work. [...]

So what's needed here, is a way to tell Portage to only disable a global
USE flag for packages that also offer another one, specified by the
user. Like this pseudo make.conf syntax:

   USE="pulseaudio pulseaudio?(-alsa) qt qt?(-gtk)"

There should be a proper way of doing this.

There is no extant way to do what you want to do. USE flags operate in
isolation and their end result is strictly limited to their own scope.

Doing what you suggest leads to horrible breakage as the flag is no
longer doing what you think it is doing, it is now possibly doing
something quite different.

But it's already possible to do this through package.use. All I'm asking for is support for doing this in an automated way, without me needing to set USE flags in package.use for each package individually.

Also, what exactly would this break? I can't think of any breakage because of this.


Portage is already doing this properly.

It's not doing it at all.


The correct way to deal with this (if there is such a thing) is in the
package's own build system. That so few do such things is in itself telling.

That would be against Gentoo policy. Packages should offer build time configurations options for this, they shouldn't introduce automagic deps by checking what's available on your system. And that wouldn't work anyway; PulseAudio needs ALSA, so the build system would detect it anyway.


Reply via email to