Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: ferringb@×××××.com
Subject: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Date: Tue, 19 Jun 2012 08:43:10
Message-Id: 20120619104347.22fd016f@pomiocik.lan
In Reply to: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags by Brian Harring
1 On Mon, 18 Jun 2012 20:04:48 -0700
2 Brian Harring <ferringb@×××××.com> wrote:
3
4 > On Sun, Jun 17, 2012 at 10:31:59PM +0200, Micha?? G??rny wrote:
5 > > 4. flags listed in ``IUSE_RUNTIME`` may be referred through USE
6 > > dependencies by other packages' ``DEPEND``, ``RDEPEND``
7 > > and ``PDEPEND`` variables.
8 >
9 > Unless I'm on crack, you're stating that essentially an optional use
10 > flag (one you label 'runtime'), is able to be used transitively
11 > during DEPEND. That's not particularly "here's some suggested pkgs
12 > to install"- that's "rebuild the fucker for this changed DEPEND",
13 > which is the existing situation.
14
15 It could be used by another package. Let's say dev-util/foo
16 is a documentation generator in Python. It has optional runtime
17 dependencies for HTML output enabled via USE=html.
18
19 If dev-libs/bar uses foo for HTML output during the build, it can
20 DEPEND on dev-util/foo[html].
21
22 > > The remaining reused features include:
23 > >
24 > > - dependency syntax,
25 >
26 > If you invent new syntax, I'm going to be unhappy. KISS as it were.
27 >
28 > > - ability to use ``REQUIRED_USE``, USE dependencies,
29 > > - ability to describe flags in `metadata.xml`,
30 > > - global flag names (and descriptions).
31 > >
32 > > Alternative proposed solution involved creating additional
33 > > ``SDEPEND`` variable. That proposition had the following
34 > > disadvantages:
35 > >
36 > > - being package-oriented rather than feature-oriented,
37 >
38 > No; use flags are our configuration space, and they turn on/off
39 > sections of the given pkgs graph. Your proposal relies on the same
40 > concept; bluntly, what you're proposing is just as 'package oriented'.
41 >
42 > Effectively, you can't dismiss SDEPEND/ODEPEND via changing the rules
43 > between your proposal and ODEPEND's proposal. Nice try though. :)
44
45 USE flags can describe features, like USE=ssl, USE=html, USE=whatever.
46 The exherbo suggested dependencies just list the relevant packages.
47
48 In other words, here you enable USE=html to get HTML output. With
49 SDEPEND, you would --take dev-python/somerandomhtmllibrary.
50
51 > > - lack of ability to express multiple packages required by a single
52 > > feature,
53 >
54 > Eh? SDEPEND="my_feature? ( pkg1 pkg 2 )"
55
56 SDEPEND didn't involve USE flags. If it did, we're back to square one.
57
58 > > - lack of ability to express cross-feature dependencies,
59 >
60 > Clarify. This is a wee bit too vague for responding to ;)
61
62 REQUIRED_USE. You don't have USE flags, you can't do that.
63
64 > > - lack of ability to describe features provided by enabled packages,
65 >
66 > metadata.xml's local use description already covers that; in your
67 > proposal above you lock in on use flags for the controlling of it
68 > (which, presumably you'll abuse to get descriptions of) yet claim
69 > it's not possible for ODEPEND (better name than SDEPEND :P).
70
71 It didn't use USE flags.
72
73 > > - necessity of implementing a new user interface parts to control
74 > > the dependencies,
75 >
76 > Um... This is bullshit. Your proposal above is going to require a
77 > lot more implementation, documentation of how this all is supposed to
78 > work, and user ededucation for the weird scenarios where things don't
79 > behave as expected, or they don't understand why changing use flag X,
80 > results in the PM pulling in new packages (acting akin to -N), while
81 > changing flag Y doesn't, and only does so/rebuilds via -N.
82 >
83 > That's not one of those things we can easily summarize in a UI; not
84 > unless we want to extraordinarily verbose.
85
86 While ODEPEND requires additional --take option, a way to list all
87 possible packages which could be taken, teaching users why they are
88 listed yet not pulled, how to pull and unpull them.
89
90 > > - lack of backwards compatibility.
91 >
92 > This is a bit of a stretch; to be clear, you're proposing that the
93 > depgraph changes in subtle/nasty ways on the fly under your scheme,
94 > and that a PM supporting IUSE_RUNTIME vs one that doesn't, won't find
95 > new and subtle ways to blow up the packages involved (specifically to
96 > expose differing behaviour).
97
98 It does that already. See 'man emerge', --dynamic-deps.
99
100 --
101 Best regards,
102 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>