From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11432 invoked by uid 1002); 14 Dec 2003 13:26:42 -0600 Mailing-List: contact gentoo-portage-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail Reply-To: gentoo-portage-dev@gentoo.org X-BeenThere: gentoo-portage-dev@gentoo.org Received: (qmail 31328 invoked from network); 14 Dec 2003 13:26:41 -0600 From: Sami =?iso-8859-1?q?N=E4=E4t=E4nen?= To: gentoo-portage-dev@gentoo.org Date: Sun, 14 Dec 2003 21:24:28 +0200 User-Agent: KMail/1.5.4 References: <200312130427.00785.jasonbstubbs@mailandnews.com> In-Reply-To: <200312130427.00785.jasonbstubbs@mailandnews.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312142124.28873.sn.ml@bayminer.com> Subject: Re: [gentoo-portage-dev] The purpose of USE flags X-Archives-Salt: ddffb884-9e7e-4196-8be7-34ed63ee80d2 X-Archives-Hash: 1958c0d6b0ea03c624d77d184402e369 On Friday 12 December 2003 21:27, Jason Stubbs wrote: > Hello all, > > I've been thinking on the idea of USE flags and am wondering what the > developers' perspective is. They are defined in "Gentoo Guide to USE > flags" as "keywords that define options used on a system-wide basis > to configure applications during their respective compilation > procedures". Is there any other, more formal, definition? One thing that I think should be changed is the way that now they are USE flags ie binary valued variables. I would like to have these as multivalue variables, which then could be used in the following way. use.gui.gtk 10,qt 1,curses allways or using alternate more readable syntax use.gui.gtk 10 +use.gui.qt 1 +use.gui.curses allways So if I would have a packages that possibly has any of the three different possible gui's the above definition would compile the pacakges as follow. If the package has curses support the support is allways included. If it has qt and no gtk support then qt is used. If gtk is supported it will take place as the higer priority gui. If there is more than one allways qui's, but all of them are not supported at the same time so instead of allways we possibly could use to priority types look below. > My reason for asking is that my feel, from the way developers and > experience users talk about USE flags, that their usage has been > mostly restricted to options provided by configure scripts. This is > natural as (I assume) that's the way that USE flags evolved. However, > I think that the the purpose of USE flags needs to be rethought, when > implemented in portage-ng, to include how USE flags pertain to the > system as a whole. And here I give another possibility that could be used as a multi valued variable. use.X never This definition would simply block any tries to install something that would need an X-server to be runned. So we would need a definition for the ebuilds like the following. in xfree ebuild: never_use=use.X This would mark that this ebuild can't be installed when the useflag use.X is set to never. This same thing could be used to block say Gnome or KDE or ... Here are some things to thought for this kind of system. What kinds of values except priority we allow? should we have type defined the use 'flags'? This is quite hard, but it would be better if we could manage using only one type of variables even if the type would be quite complex. If yes what kind of different types we need? The earlier mentioned gui example could has two allways stated gui's, but if only one of them can be used then we would need two different numerical value types. As an example: use.gui.gtk allways 10 -use.gui.qt +use.gui.curses allways This would add gtk and curses allways, but if only one of them can be used then it is gtk. Qt support is disabled in this example. Do we need multiple numerical types, or can we use simply one numerical type and interpret it differently as needed. How to make this efficient? In my mind this need's a database, but in my mind all portage stuff should be in a database, but that's another story at the moment ( I'm thinking it constantly, and the idea is heading out, but I need to write it down first). I should state the difference of following two definitions to make sure everybody understands what the heck I'm talking about. :) -use.X use.X never The former is mild forbid. So if the support is not required to use the application, then the application can be used. It will be without the support for X though. The second definition simply says that if one ever tried to install package that would install X, then this package can't be installed. Applications that has optional support for X can be use though, because they can be compiled without X support. So in the first case X server itself can be installed excplicitly, but in the later it can't be installed at all. And here are the examples of my definitions as they would be in a config file (remember that I would put these in the DB). =use.gui.gtk prefer 10 # Any other gui variables, but gtk are forbiden +use.gui.gtk prefer 10 # Only affects the value of the gtk variable -use.gui.gtk # Only disables gtk support -use.gui.gtk prefer 10 # Same thing, because the value is ignored !use.gui.gtk # Forbids installation of gtk and gtk apps +use.gui.gtk never # Same thing -use.gui.gtk never # Not same thing the never is ignored So this has a grammar of something like this definition = And some dangerous examples to show that the powerfull absolute denial definitions should be thought well before using. !use.gui # Forbids all packages that use any GUI variables !use # Forbids all packages that use any USE variables So now comments are welcome. :) -- gentoo-portage-dev@gentoo.org mailing list