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