Gentoo Archives: gentoo-dev

From: hasufell <hasufell@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Date: Tue, 19 Jun 2012 16:57:32
Message-Id: 4FE0AE7E.6030306@gentoo.org
In Reply to: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags by "Michał Górny"
1 On 06/17/2012 10:31 PM, Michał Górny wrote:
2 > Hello,
3 >
4 > A simple solution to a program long-unsolved. In GLEP form.
5 >
6 > Both attached and published as a gist:
7 >
8 > https://gist.github.com/2945569
9 >
10 > (please note that github doesn't render GLEP headers correctly)
11 >
12
13 As already stated I like this idea, because I already got some optional
14 dep bloat in x11-misc/spacefm and media-sound/gmusicbrowser.
15
16 However I have a few objections:
17
18 1. Optional deps are SUGGESTIONS from the dev which he considered
19 nice/good/sane at the time of writing the ebuild. Other people might
20 totally disagree with those suggestions.
21 As useflags in IUSE_RUNTIME can pick from global useflags as well or
22 even set "+foo" the user might have a hard time to turn off things he
23 does not want without turning them off for regular IUSE as well.
24
25 Means: "foo" pulls in an optional dependency for package suckbar/gaybar,
26 but it also pulls in build-time deps for nerdbar/geekbar
27
28 The user has to figure out now what the useflag does for each package
29 and micromanage useflags to maybe avoid undesired optional deps.
30
31 FEATURES="optional-deps" would be one way to overcome this, so I can
32 globally turn useflags in IUSE_RUNTIME off without those in regular IUSE.
33
34 But that may cause problems with REQUIRED_USE then maybe, not sure.
35
36
37 2. Afais useflags that are already in IUSE and used for build-time stuff
38 must not be used for IUSE_RUNTIME too.
39 This is a random rule IMO. I don't have many cases in mind where this
40 would be annoying (could think of "debug" enabling some in-source
41 switches and adding optional debug tools in RDEPEND. Having one flag
42 here would make it cleaner and tighter for the user to interact with
43 useflags.).
44
45 However... this is not a logical rule, rather a technical issue. If
46 there is a way to avoid this restriction that would be nice.
47
48 (There was one proposal about expanding useflags in IUSE_RUNTIME, but I
49 have not thought far in that direction.)
50
51
52 3. There are no unconditional optional deps possible.
53 ssuominen had an example:
54 "virtualx.eclass could have suggestion/recommendation to enable USE=xvfb
55 in x11-base/xorg-server"
56
57
58 and some things I forgot...

Replies