Gentoo Archives: gentoo-dev

From: Troels Vognsen <troels@×××××××××.dk>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Proposal regarding use flags
Date: Wed, 19 May 2004 23:05:15
Message-Id: hxzhgp.sbha14@webmail.cliche.dk
1 Hi !
2
3 At some point earlier today, the gentoo-hardened use flag discussion
4 evolved into a debate of the use flag system. The arch topic was the
5 amount of use flags, and how Gentoo could maintain the freedom
6 of choice while providing plenty of options.
7
8 This is a proposal on how (I think) the use flag situation (among a
9 few other things) could be improved. It's heavily inspired by the
10 suggestions made in the debate mentioned above.
11
12 - - - - - - - - -
13
14 Profiles gets split up in two:
15 --arch-profiles: flags that affect the compilation/configuration of the entire system or *vital* components (like hardened and arch settings)
16 --purpose-profiles: flags that define the settings/dependecies suiting the target purpose (role)
17
18 This way I would rarely have to disable flags, because I largely chose
19 the base ones in the first place.
20
21 Global use flags are put into groups, grouped like the kernel.
22 Local use flags are put into groups, grouped by package.
23 That means we'll have 2 arch-groups, one for local-flag groups
24 and one for global-flag groups. Since we can the devide these
25 arch-groups into subgroups, we'll end up with something that
26 is organised like the make menuconfig for kernel 2.6. Lots of
27 options (mainly due to the local flags), but nicely organised.
28
29 Each use flag (wheter local or global) has 3 options:
30 0: disable
31 1: enable-no-dep (enable if it can be done, without installer further packages)
32 2: enable-with-dep (enable, even if it means installing additional packages)
33
34 This ensures that the use flags ain't controlling/expanding
35 the base of installed packages unless we want it to. This also
36 emphasises the purpose of the use flags: to tune packages and
37 manage features.
38
39 Then installing kde won't look like:
40 - set the kde use flags
41 - (if accidently) emerge mc (or whatever package that ultimately depends)
42 I've seen a lot of users doing this, and I belive it's quite wrong.
43 As it is now, you can't seperate adding support for, and actually
44 installing the application.
45
46 Metapackages can enable (not disable) use flags. A seperate config
47 file is made for the flags enabled by each metapackage
48 (organised in a 'flags enabled by foo-package' way). We keep this
49 out of make.conf sice we wanna emphasise that the user ain't
50 supposed to modify it under normal circumbstances.
51
52 This will allow you to install major software packages, without
53 going through the use flag list every time.
54
55 The package groups mentioned above can be used as flags
56 themselves, by enclosing their name in @ in for instance make.conf.
57 It's possible to enable/disable groups and at the same time
58 enable/disable specific childs of that group.
59
60 The resulting value of the use flags are calculated as follows:
61 1. Default USE setting declared in /etc/make.profile/make.defaults
62 2. Inherited USE setting if a package from /etc/make.profile/use.defaults is installed
63 3. Metapackage-defined USE setting /etc/make.meta (or whatever we name the file)
64 4. User-defined USE setting in /etc/make.conf
65 5. User-defined USE setting as environment variable
66
67 The list of groups and global/local flags is resolved seperately at each
68 level, then the resulting list of global/local flags is merged with the one
69 inherited from the previous level (if any). As usual, a given levels
70 list takes presedence over the inherited one.
71
72 I know the group thing could be a little complicated, but the general
73 rule is: if the child of a group (be it a local/global flag or another
74 group) is specificly mentioned on the list of flags and groups, that
75 takes presedence over inheritance from the parent-group.
76
77 As I'm kinda new to Gentoo development, some terms might be
78 misunderstood. Likewise this is by no means meant to be a GLEP.
79 At most it's inspiration for a later one.
80
81 I could possibly do an experimental bash/sed implimentation of the
82 idea to test it.
83
84 - Troels Vognsen :-)
85
86
87 --
88 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Proposal regarding use flags Joseph Booker <joe@××××××××××.net>
Re: [gentoo-dev] Proposal regarding use flags Daniel Steinberger <Daniel.Steinberger@×××.de>
Re: [gentoo-dev] Proposal regarding use flags Ciaran McCreesh <ciaranm@g.o>