Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Guidelines for IUSE defaults
Date: Fri, 03 Feb 2017 08:16:29
Message-Id: pan$60852$74285973$436fbdc4$32aefb9a@cox.net
In Reply to: Re: [gentoo-dev] Guidelines for IUSE defaults by Michael Orlitzky
1 Michael Orlitzky posted on Thu, 02 Feb 2017 10:49:41 -0500 as excerpted:
2
3 > On 02/02/2017 09:56 AM, Ian Stakenvicius wrote:
4 >>
5 >>> On Feb 2, 2017, at 9:11 AM, Michael Orlitzky <mjo@g.o>
6 >>> wrote:
7 >>>
8 >>> IUSE defaults are used in a few different ways:
9 >>>
10 >>> 1 To ensure that critical functionality is enabled.
11 >>>
12 >>> * Example: force the "unix" module for apache.
13 >>>
14 >>>
15 >> This is not what IUSE defaults are for, this should be done with
16 >> package.use{,.stable}.{mask,force} in profiles. If functionality is
17 >> critical then there (A) shouldn't be a use flag, or (B) shouldn't be a
18 >> way for USE= in make.conf to disable it.
19 >>
20 >>
21 > If we adopted this policy, then USE="-*" would no longer be guaranteed
22 > to break the system. It does still ignore your profile defaults, though,
23 > which presumably are important (e.g. for hardened). So we're still left
24 > with no way for me to turn off everyone's pet USE flags and keep my
25 > system working.
26
27 If USE="-*" is a guarantee of a broken system, it's a pretty weak one.
28 In fact, so is flying with an empty @system (everything in the profile
29 negated), as I do both of the above.
30
31 And in fact, my gentoo-based-admin life has been far simpler since I set
32 it up that way. =:^)
33
34 The biggest benefit of USE="-*" is that I no longer have to worry about
35 investigating the "why" of USE flag changes when I change to a different
36 profile, or when devs change my existing profile out from under me. I
37 have a set of USE flags I've decided I want (or need for long-term-
38 installed stuff like kde), and all packages that don't work with that
39 default -- for instance, packages that required-use qt4 XOR qt5, already
40 have their package.use setup as appropriate.
41
42 Otherwise, when I upgrade to a new profile, as I've needed to do several
43 times over the nearing a decade and a half I've been running the same
44 original installation rolling-update gentoo on rolling-update hardware, I
45 have to do a bunch of research on all the USE flags that changed and how
46 they affect my existing installation due to --newuse. This way, that was
47 all managed at the time I encountered the original USE flag conflict, and
48 the profile I choose doesn't mess with my USE flags at all except via
49 forces (which I can override if I have to, but I haven't had to, a
50 testament to the wisely conservative usage of forced-USE).
51
52 Of course, I can and do still use the USE flags set in a profile as a
53 guide, and that was a tremendous help in the kde-apps5/frameworks5/plasma5
54 upgrade process despite the fact that I couldn't actually use the profile
55 designed for that.
56
57 The biggest weakness, meanwhile, is that with USE="-*" there's no easy
58 way to actually see what a package's USE-defaults are, without actually
59 opening up the ebuild (or at least grepping) to see. I've often wished
60 there was some way to denote the default-on flags in emerge --pretend/--
61 ask so I could see what they are on a new package, and investigate why if
62 necessary, but I understand the problem of a limited available symbol-
63 space, and actually looking in the ebuild isn't /horribly/ hard... as
64 long as there's multiple terminals available to do it in, without
65 unnecessarily canceling the --ask output that took so long to appear.
66
67 Of course it would be a bit different if I could actually use a profile
68 with all the bits I needed, nomultilib, systemd, plasma, amd64,
69 primarily. But until mixins, nomultilib generally means at least some of
70 the other stuff isn't available in a profile, so I gotta simply pick the
71 nomultilib profile that best matches and check the other profiles, for
72 example plasma, using them as a guide to set my flags the way I need them.
73
74 Similarly with @system. Negating the entire thing a package at a time
75 and seeing what --depclean wants to clean, then adding as appropriate to
76 a set listed in world_sets if it's /really/ needed, means I don't have to
77 worry about package.providing openrc, for instance, because it's not
78 necessary with systemd, once a single symlink is setup. Similarly with
79 ssh if it's only a stand-alone system you're admining. And most of the
80 @system virtuals can simply be dropped, as specific selections from those
81 virtuals have already been added to some set listed in world_sets.
82
83 Of course it helps that my routine-use emerge aliases have --ask
84 --verbose --oneshot. (I don't configure those as emerge-defaults because
85 I do for example want --pretend occasionally instead of --ask.) But
86 that's a lesson most gentooers should have learned within six months.
87
88 Anyway, USE="-*" hardly breaks the system here. In fact, rather the
89 opposite, it fixes what was previously a major headache of a workaround
90 for a broken system every time my profile changed, because I was setting
91 most USE flags I wanted but until then, not *ALL* of them, in part
92 because I couldn't see what I had missed because the profile was setting
93 it for me... until it didn't, thus creating the problem.
94
95 So for some people, especially those likely to have systems they're
96 managing over a profile upgrade, USE="-*" is a guaranteed fix, not a
97 guaranteed break. =:^)
98
99 --
100 Duncan - List replies preferred. No HTML msgs.
101 "Every nonfree program has a lord, a master --
102 and if you use the program, he is your master." Richard Stallman