From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.3/8.13.3) with ESMTP id j28JE8O8014246 for ; Tue, 8 Mar 2005 19:14:08 GMT Received: from smtp1.clear.net.nz ([203.97.33.27]) by smtp.gentoo.org with esmtp (Exim 4.42) id 1D8k9e-0008K9-H4 for gentoo-dev@robin.gentoo.org; Tue, 08 Mar 2005 19:14:06 +0000 Received: from [192.168.1.106] (tempest-amkp.christchurch.clix.net.nz [203.97.10.134]) by smtp1.clear.net.nz (CLEAR Net Mail) with ESMTP id <0ID100HYQS3FO3@smtp1.clear.net.nz> for gentoo-dev@gentoo.org; Wed, 09 Mar 2005 08:14:04 +1300 (NZDT) Date: Wed, 09 Mar 2005 08:14:17 +1300 From: Jerome Brown Subject: Re: [gentoo-dev] GLEP 29 (USE groups) and negatives In-reply-to: <20050306162849.247c8c8f@snowdrop> To: gentoo-dev@robin.gentoo.org Message-id: <422DF989.3090206@hub.net.nz> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-To: gentoo-dev@gentoo.org MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0 (X11/20050119) X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime References: <20050306162849.247c8c8f@snowdrop> X-Archives-Salt: cc944afe-2ea8-4f7c-b51e-66b6c94bd902 X-Archives-Hash: bce778a3920bb96b987754b02f6417bc 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 -@GROUP 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 -@GROUP. For example, the usage of @KDE and @GNOME groups in the glep looks like this: 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. 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 -@GNOME" or USE="@GNOME -@KDE" and to get both would have USE="@KDE @GNOME" which would resolve correctly. The issue comes with resolving the individual (@KDE -@GNOME 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 -@KDE" 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: jerome@hub.net.nz W: http://www.hub.net.nz/ O: Level 4, 818 Colombo St, Christchurch, New Zealand S: PO Box 1879, Christchurch, New Zealand -- gentoo-dev@gentoo.org mailing list