Gentoo Archives: gentoo-dev

From: "Steven J. Long" <slong@××××××××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Re: example conversion of gentoo-x86 current deps to unified dependencies
Date: Sun, 07 Oct 2012 13:56:48
Message-Id: 20121007140927.GA3586@box.sukhisoft.com
In Reply to: Re: [gentoo-dev] Re: example conversion of gentoo-x86 current deps to unified dependencies by Brian Harring
1 On Sun, Sep 30, 2012 at 03:15:18PM -0700, Brian Harring wrote:
2 > On Wed, Sep 19, 2012 at 09:16:02AM -0400, Ian Stakenvicius wrote:
3 > > On 19/09/12 09:09 AM, Michael Orlitzky wrote:
4 > > > The problem appears as we introduce more DEPEND variables (which is
5 > > > what prompted the proposal, IIRC). If we have ADEPEND, BDEPEND,
6 > > > CDEPEND, and DDEPEND, and there's only some (i.e. not total)
7 > > > sharing going on then the COMMON_DEPEND pattern starts to fall
8 > > > apart. You potentially need,
9 > > >
10 > > > AB_DEPEND AC_DEPEND AD_DEPEND BC_DEPEND BD_DEPEND CD_DEPEND
11 > > > ABC_DEPEND ABD_DEPEND ACD_DEPEND BCD_DEPEND ABCD_DEPEND
12 > > > (COMMON_DEPEND)
13 > > >
14 > > > This obviously gets worse as more DEPEND vars are introduced.
15 > > >
16 > >
17 > > Well not really, no -- the additional *DEPENDs that are being proposed
18 > > (or at least mentioned) for new EAPI will either remove atoms from
19 > > COMMON_DEPEND/DEPEND/RDEPEND or will be used so tersely that a
20 > > COMMON_DEPEND or other intermediate variable won't really be necessary
21 > > for them.
22 >
23 > It depends on the dep type actually, and how we're viewing those deps-
24 > if they must be complete or not.
25 >
26 > Consider test depends for example.
27
28 I'd like to see some concrete discussion of link-depends/lib-depends, since
29 they represent a much more fundamental type of dependency, and would imo
30 remove atoms from a lot of other places.
31
32 Discussing test dependencies first, seems like putting the cart before the
33 horse.
34
35 > The point I'm trying to make here is that each dep phase
36 > should be authorative; in doing so, you start getting
37 > a lot of potential subsets (DEPEND is a subset of TDEPEND, TDEPEND
38 > isn't completely, but mostly a subset of RDEPEND as RDEPEND is a
39 > likely a superset of DEPEND; PDEPEND is a superset of RDEPEND).
40 >
41 And all of them are a superset of LDEPEND (which is why I say it's more
42 fundamental, and class it as an omission from the original conversion
43 from ports to portage. The fact that link-dependencies are required to be
44 installed before build can begin, does not make them BUILD_DEPENDS, of
45 which DEPEND is the equivalent in Gentoo.)
46
47 In terms of what has been mentioned before, the set of dependencies
48 required at a particular point, LDEPEND are required at all of them.
49
50 As for the authoritative set at each point, you've already shown that the
51 package mangler has to build that currently, so there's no implementation
52 cost in continuing to do so.
53
54 > So... you could do COMMON_DEPEND, COMMON_TDEPEND, COMMON_RDEPEND in
55 > the ebuild. Or you could just use a syntax form that allows you to
56 > directly inline that up front, rather than having to muck around w/
57 > intermediate vars.
58 >
59 Or you could address the gaping hole in the spec, and allow people to simply
60 specify the most fundamental dependency, without having to hack it in.
61
62 Then TDEPEND would just be what was required in addition during TEST phases,
63 a large amount of those common dependency variables would not be needed, and
64 similarly for C/HOST_DEPENDS (aka the new DEPEND under the awfully-specified
65 HDEPEND EAPI) since by definition a library dependency lives in the same
66 ROOT as the installed package.
67
68 >
69 > > Besides, this isn't actually a -problem- as there's nothing which
70 > > really requires one to use such helpers; ebuild writers just, well,
71 > > can. :)
72 >
73 > Getting to this point; yes, people could hack around it manually.
74 > Pretty sure that hasn't been in doubt.
75 >
76 > The question is what do we *gain* from making them do so. No one here
77 > has stated what we gain from COMMON_DEPENDS in comparison to
78 > DEPENDENCIES (where they can just inline it).
79 >
80 LDEPEND enables much better tracking of linkage, which is pretty fundamental
81 to building and maintaining a distribution. It's also something that
82 programmers specify upfront in configure and makefiles. As shown above,
83 it eliminates a lot of common dependencies, and at least some HDEPEND (if
84 that variable name is used accurately.)
85
86 Additionally, separating out the variable (which yes, can also be done with
87 a label, but it does need to be done) means linkage can be tracked
88 automatically based on the sort of data that every package supplies, every
89 other distribution provides, and every developer has to think about when
90 writing an ebuild; instead of on yet another syntax obfus^W complication that
91 was designed for java and python plugins.
92
93 Doing it in a separate variable as opposed to labelling it, means that
94 variable can be treated differently, should that be desired in a new EAPI.
95 Such a change in how LDEPEND were specified, would not impact on any of the
96 rest of the single variable format (which is more complex, and more
97 interdependent, at least in its scripted form) and would not need to be
98 verified against all the other types of specification in the rest of that
99 "integrated" variable. So a separate variable is more flexible.
100
101 It's also a *lot* more transparent.
102
103 For instance, if we'd had that before, do you agree we'd have been scanning
104 binaries to check for linkage outside that set and system? (After all, we
105 scan for a lot of other stuff already; scanelf is a gentoo success story.)
106
107 How would usage of revdep-rebuild been affected? What about implementation
108 of preserved-libs?
109
110 > And as I'm trying to lay out, where dependencies *should* be going
111 > towards, this issue will get worse if we're doing it out of band from
112 > DEPENDENCIES.
113 >
114 You've given a convincing argument for the package mangler using a unified
115 variable internally, and if the PM authors all agree, using that in the
116 cache format. (ie the extra parsing complexity and maintenance is worth it
117 for the difference in IO across the cache.)
118
119 But you've also shown exactly how all that information can be inferred from
120 the existing ebuild format (and once inferred would actually be simpler than
121 the whole variable specified in the ebuild.) As such, it appears more like
122 something that should be in the back-end, without requiring such a shift in
123 how people write ebuilds.
124
125 Your additional arguments as to why this gets more complex later down the
126 line are predicated on ignoring LDEPEND.
127
128 If that requires a bit more runtime at cache-generation, we're already paying
129 that price. Saving a small amount of time there, where most users never see
130 it, doesn't seem worth the mental effort, and maintenance cost, required
131 to change the format. "Just go ahead and use it in the cache," seems like
132 the best solution.
133
134 Regards,
135 steveL.