|
|
[Gentoo Linux Home] [GLEP Index] [GLEP Source] |
| GLEP: | 29 |
|---|---|
| Title: | USE flag groups |
| Version: | 1.1 |
| Author: | Ciaran McCreesh <ciaranm at gentoo.org> |
| Last-Modified: | 2004/08/22 01:59:24 |
| Status: | Draft |
| Type: | Standards Track |
| Content-Type: | text/x-rst |
| Created: | 19-August-2004 |
| Post-Date: | 21-August-2004 |
BIG FAT DISCLAIMER: EARLY DRAFT, SEND COMMENTS TO ciaranm. EVERYTHING IN HERE IS OPEN TO DISCUSSION. THE WRITING STYLE SUCKS. MAY CAUSE CANCER IN PUPPIES.
Currently, USE flags must be selected on a one-by-one basis, making it time-consuming to set up make.conf appropriately for a machine's role.
USE flags allow the user to have software built in a manner which is relevant for their system's role. For example, a desktop user will probably want to enable optional X support in packages, whereas a server user will not. However, with several hundred USE flags available, it can be time consuming to set up make.conf appropriately.
This GLEP proposes a mechanism for grouping USE flags to simplify selection.
A group shall consist of one or more USE flags. These groups are defined in ${PORTDIR}/profiles/use.groups. It is proposed that uppercase names only are used for groups to keep them visually distinct from normal USE flags. The file format is similar to the existing use.* files:
SOME_GROUP flag1 flag2 flag3 OTHER_GROUP flag2 flag4
Groups may recursively include other groups. For consistency with GLEP 23 [1], it is proposed that group names are prefixed with an 'at' symbol (@):
GROUP1 flag1 GROUP2 flag2 flag3 @GROUP1 GROUP3 flag4 GROUP4 @GROUP2 @GROUP3 flag5
Users may create their own groups using /etc/portage/use.groups. This file overrides the profile settings in the case of duplicates.
Groups shall have a textual description associated with them in the same way as USE flags. The file ${PORTDIR}/profiles/use.groups.desc contains these:
DESKTOP Flags which are appropriate for most desktop systems RECOMMENDED Flags which should be enabled on almost all systems
Groups may be used in /etc/make.conf, /etc/portage/package.use and other places where USE flags are normally specified. Again, the @ symbol is used. For example, a make.conf for a desktop system might resemble:
USE="@DESKTOP @KDE perl alsa dvd"
Groups should not generally contain negative USE flags, as this would lead to confusion. Groups are intended to specify what will be enabled for a given role, not what will be turned off. For example, if the @KDE group disabled Gnome-related USE flags, and a user used USE="@GNOME @KDE" to specify that they wanted both Gnome and KDE to be used where applicable, chaos would ensue. However, for the sake of consistency, -flags should be supported even if their use is strongly discouraged.
It is proposed that -@GROUP syntax should not be supported. Instead, users wishing to turn most things off could use the -* USE syntax along with a group (for example, @RECOMMENDED) which turned on flags (for example, pam and readline) which should usually be used.
The actual groups to be created is beyond the scope of this GLEP, and any group names contained herein should be treated as examples only. Creation of new groups and changing a group's flags should be discussed on the gentoo-dev mailing list as per existing policy for new global USE flags.
USE groups will simplify selecting an appropriate set of USE flags for a system.
The user will not need to make any changes to keep their current setup. Users who are not running a portage version which supports groups can carry on using current syntax with no side-effects.
Some tools which work with make.conf and / or USE flags (for example, ufed) will need to be updated to understand the new group syntax.
There is currently a dymanic list of USE flags available on the Gentoo website [2]. For consistency, a similar list will be needed for USE groups.
| [1] | GLEP 23: Portage handling of ACCEPT_LICENSE (http://www.gentoo.org/proj/en/glep/glep-0023.html) |
| [2] | http://www.gentoo.org/dyn/use-index.xml |