/[gentoo]/xml/htdocs/proj/en/glep/glep-0029.txt
Gentoo

Diff of /xml/htdocs/proj/en/glep/glep-0029.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1GLEP: 29 1GLEP: 29
2Title: USE flag groups 2Title: USE flag groups
3Version: $Revision: 1.2 $ 3Version: $Revision: 1.3 $
4Author: Ciaran McCreesh <ciaranm@gentoo.org> 4Author: Ciaran McCreesh <ciaranm@gentoo.org>
5Last-Modified: $Date: 2004/08/22 02:02:32 $ 5Last-Modified: $Date: 2004/10/18 15:32:10 $
6Status: Draft 6Status: Draft
7Type: Standards Track 7Type: Standards Track
8Content-Type: text/x-rst 8Content-Type: text/x-rst
9Created: 19-August-2004 9Created: 19-August-2004
10Post-Date: 21-August-2004 10Post-Date: 21-August-2004, 18-October-2004
11
12BIG FAT DISCLAIMER: EARLY DRAFT, SEND COMMENTS TO ciaranm. EVERYTHING IN
13HERE IS OPEN TO DISCUSSION. THE WRITING STYLE SUCKS. MAY CAUSE CANCER IN
14PUPPIES.
15 11
16Abstract 12Abstract
17======== 13========
18 14
19Currently, USE flags must be selected on a one-by-one basis, making it 15Currently, USE flags must be selected on a one-by-one basis, making it
20time-consuming to set up make.conf appropriately for a machine's role. 16time-consuming to set up make.conf appropriately for a machine's role.
21 17
22Motivation 18Motivation
23========== 19==========
24 20
25USE flags allow the user to have software built in a manner which is 21Many packages have optional support for other packages (for example, the
26relevant for their system's role. For example, a desktop user will 22Vim text editor can optionally support perl, python and ruby
27probably want to enable optional X support in packages, whereas a server 23interpreters). In Gentoo, these optional dependencies can be selected by
28user will not. However, with several hundred USE flags available, it can 24the user using USE flags. This allows a system appropriate for a given
29be time consuming to set up make.conf appropriately. 25environment to be built -- a server, for example, should not typically
26have an X11 server or sound support, whereas both would be desirable on
27most desktop systems.
30 28
31This GLEP proposes a mechanism for grouping USE flags to simplify 29With several hundred USE flags available, deciding upon which USE flags to
32selection. 30enable and which to disable can take a long time. This GLEP proposes a
31mechanism for grouping USE flags to simplify selection.
33 32
34Specification 33Specification
35============= 34=============
36 35
37Group Specification 36Group Specification
38------------------- 37-------------------
39 38
40A group shall consist of one or more USE flags. These groups are defined 39A group shall consist of one or more USE flags. These groups are defined
41in ``${PORTDIR}/profiles/use.groups``. It is proposed that uppercase names 40in ``${PORTDIR}/profiles/use.groups``. It is proposed that uppercase names
42only are used for groups to keep them visually distinct from normal USE 41only are used for groups to keep them visually distinct from normal USE
43flags. The file format is similar to the existing use.* files: 42flags, although this should not be enforced programatically. The file
43should be similar in format to the existing use.* files. In the following,
44``SOME_GROUP`` and ``OTHER_GROUP`` are group names, and ``flag1`` through
45``flag5`` are USE flag names:
44 46
45:: 47::
46 48
47 SOME_GROUP flag1 flag2 flag3 49 SOME_GROUP flag1 flag2 flag3
48 OTHER_GROUP flag2 flag4 50 OTHER_GROUP flag2 flag4
55 GROUP1 flag1 57 GROUP1 flag1
56 GROUP2 flag2 flag3 @GROUP1 58 GROUP2 flag2 flag3 @GROUP1
57 GROUP3 flag4 59 GROUP3 flag4
58 GROUP4 @GROUP2 @GROUP3 flag5 60 GROUP4 @GROUP2 @GROUP3 flag5
59 61
62The same flag may end up being in a particular group more than once:
63
64::
65
66 GROUP1 flag1 flag2
67 GROUP2 flag2 flag3
68 GROUP3 @GROUP1 @GROUP2 flag3 flag4
69
70As with similar files, comments may be included. Lines which begin with a
71hash symbol (#) are comments.
72
73::
74
75 # This is a comment
76 FOO bar baz fnord
77
60Users may create their own groups using ``/etc/portage/use.groups``. This 78Users may create their own groups using ``/etc/portage/use.groups``. This
61file overrides the profile settings in the case of duplicates. 79file overrides the profile settings in the case of duplicates.
62 80
63Group Descriptions 81Group Descriptions
64------------------ 82------------------
67way as USE flags. The file ``${PORTDIR}/profiles/use.groups.desc`` 85way as USE flags. The file ``${PORTDIR}/profiles/use.groups.desc``
68contains these: 86contains these:
69 87
70:: 88::
71 89
90 # This is a comment
72 DESKTOP Flags which are appropriate for most desktop systems 91 DESKTOP Flags which are appropriate for most desktop systems
73 RECOMMENDED Flags which should be enabled on almost all systems 92 RECOMMENDED Flags which should be enabled on almost all systems
74 93
75 94
76Using Groups 95Using Groups
95chaos would ensue. However, for the sake of consistency, -flags should be 114chaos would ensue. However, for the sake of consistency, -flags should be
96supported even if their use is strongly discouraged. 115supported even if their use is strongly discouraged.
97 116
98It is proposed that ``-@GROUP`` syntax should *not* be supported. Instead, 117It is proposed that ``-@GROUP`` syntax should *not* be supported. Instead,
99users wishing to turn most things off could use the ``-*`` USE syntax 118users wishing to turn most things off could use the ``-*`` USE syntax
100along with a group (for example, @RECOMMENDED) which turned on flags (for 119along with a group (for example, @RECOMMENDED or @MINIMAL) which turned on
101example, pam and readline) which should usually be used. 120flags (for example, pam and readline) which should usually be used.
102 121
103Adding New Groups 122Adding New Groups
104----------------- 123-----------------
105 124
106The actual groups to be created is beyond the scope of this GLEP, and any 125The actual groups to be created is beyond the scope of this GLEP, and any

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20