Ciaran McCreesh wrote: > http://www.gentoo.org/proj/en/glep/glep-0029.html > > We need to decide upon a solution to the -flags problem. The proposed > solutions are: > > 1) Disallow all negatives. Disadvantages: we don't tend to disallow > things just because users could shoot themselves in the foot with them. > > 2) Allow negatives, and document how to use them correctly. > Disadvantages: sooner or later, some developer isn't going to read the > docs, and will really really screw things up with a misunderstanding. > > 3) Reorder USE flags. Disadvantages: can't disable flags set by a group. > Breaks existing USE lines. > > 4) Have portage warn on dodgy USE flag lines. Disadvantages: tricky, > hard for the end user to figure out. > > 5) Use some weird tristate notation. Disadvantages: not everyone has the > slightest clue what set theory is. > > I'm in favour of 2) personally, but others disagree. I'd like a proper > discussion on this before trying to get the GLEP through. > How about another option?
6) Disallow -USE within groups, but allow [EMAIL PROTECTED] Looking through the GLEP, I notice that the examples of where problems of allowing -USE flags in a group could be resolved by not allowing the -USE but allowing [EMAIL PROTECTED] For example, the usage of @KDE and @GNOME groups in the glep looks like this: <quote glep> If, for example, the KDE group turned off GNOME things and the GNOME group turned off KDE things: KDE X kde qt -gtk -gnome GNOME X gtk gtk2 gnome -kde -qt And a user wished to use both KDE and GNOME on a system, and so had USE flags as follows: USE="@KDE @GNOME" They would end up with: USE="X kde qt -gtk -gnome X gtk gtk2 gnome -kde -qt" Which simplifies: USE="X gtk gtk2 gnome -kde -qt" This is clearly not the desired effect. </quote> If, however we disallowed negatives in the group, you would define them as: KDE X kde qt GNOME X gtk gtk2 gnome Therefore to get the desired effect of the originally suggested @KDE or @GNOME the user would put: USE="@KDE [EMAIL PROTECTED]" or USE="@GNOME [EMAIL PROTECTED]" and to get both would have USE="@KDE @GNOME" which would resolve correctly. The issue comes with resolving the individual (@KDE [EMAIL PROTECTED] or vice versa) as both define X, and a -X comes from the other. I guess that this could be resolved by defining that if a USE flag is defined in a group, and another group negates it, that portage ignores the negation, however if the negation is specified by the user in their USE line then the negation is allowed: Therefore USE="@GNOME [EMAIL PROTECTED]" would resolve to USE="X gtk gtk2 gnome -kde -qt" and USE="@GNOME -X" would resolve to USE="gtk gtk2 gnome -X" Just my 0.02 Universal Currency -- Jerome Brown Technology Architect Hub.Net P: +64 3 961-5116 M: +64 29 453 7663 F: +64 3 961-5129 E: [EMAIL PROTECTED] W: http://www.hub.net.nz/ O: Level 4, 818 Colombo St, Christchurch, New Zealand S: PO Box 1879, Christchurch, New Zealand -- [email protected] mailing list
