Gentoo Archives: gentoo-dev

From: Brian Harring <ferringb@×××××.com>
To: gentoo-dev@l.g.o
Cc: axs@g.o
Subject: Re: [gentoo-dev] Addressing GLEP-62 itself
Date: Tue, 25 Sep 2012 19:55:43
Message-Id: 20120925195439.GA26094@localhost
In Reply to: Re: [gentoo-dev] Addressing GLEP-62 itself by "Michał Górny"
1 On Tue, Sep 25, 2012 at 08:58:07PM +0200, Micha?? G??rny wrote:
2 > On Tue, 25 Sep 2012 14:47:33 -0400
3 > Ian Stakenvicius <axs@g.o> wrote:
4 >
5 > > Based on the above I do expect the reference implementation would also
6 > > need to change. I expect, for instance, that the PM's
7 > > metadata-handling would need to occur as normal even though none of
8 > > the package's phase functions would run, that is, *DEPEND
9 > > (realistically RDEPEND as that should be the only one affected here,
10 > > maybe PDEPEND too) and USE/PKGUSE would get updated. Since portage
11 > > would not be re-emerging the package from the tree the original ebuild
12 > > would remain.
13 >
14 > Yes, unless I'm missing something that's the intent. I will re-read
15 > and update the GLEP a bit sometime this week.
16
17 There's a fairly strong user interaction component here, along w/
18 potential nastyness for ebuilds (the proposal assume that a flag will
19 be toggable in all cases within an ebuild if IUSE_RUNTIME specified; I
20 guarantee instances where that fails can be found in the tree if a
21 basic audit was done). Additionally, this *is* useless if it's done
22 in a form the UI an't display/handle; Ciaran may bitch about
23 REQUIRED_USE's UI (which I knew going in was going to be
24 problematic, just to be clear), but he's right on that front.
25
26 Additionally, this needs to be thought out how it'll interact with
27 eclasses; what stacking, etc. It doesn't cover the basics there to
28 say the least.
29
30 Pretty much, this needs an implementation, partial conversion of the
31 tree to demonstrate it.
32
33 Just to prove that fricking point; if you had tried implementing this,
34 a full investigation of what's involved alone, you'd have spotted that
35 the core of the proposal is based on a wrong assumption.
36
37 Portage doesn't write unfinalized DEPEND/RDEPEND/PDEPEND to the VDB.
38
39 Literally, USE=-x RDEPEND="x? ( dev-util/diffball )", the RDEPEND in
40 the vdb is going to be "".
41
42 The retort is "meh, that's minor"; the fact this was missed doesn't
43 inspire confidence; further, aside from the fact that writing
44 finalized deps to the VDB ie, an accurate form of the deps- they're
45 locked at that point, a smart PM can take advantage of that to avoid
46 reading USE/IUSE till it's needed. This has measurable speed impact;
47 if in doubt, rebuild a tree without it- that little trick I came up
48 with first in pkgcore and it works on two fronts; 1) parsing is
49 quicker, less nodes/smaller tree, 2) a smart PM can lazy load the
50 USE/IUSE for performance gain. This is why portage/pkgcore were
51 intentionally modified to do this; paludis may do it, haven't looked.
52
53 My views, if the council is sane they'll slap it back down stating
54 "prove it's a viable solution"; regardless of my views of the proposal
55 (that it's the wrong way to solve it), it's not ready for an actual
56 vote since approving it without actually verifying it could work makes
57 things fucktons worse.
58
59
60 > > I expect, as a corollary to this, that a rebuild would be necessary if
61 > > (on-disk-IUSE_RUNTIME xor in-ebuild-IUSE_RUNTIME) was non-empty
62 > > (--newuse) or resulted in any flags that are in USE
63 > > (--reinstall=changed-use). IMO this would be necessary to ensure the
64 > > local ebuild copy and all related metadata for it gets updated in vdb.
65 >
66 > I think that's a common package manager logic and it's out of scope
67 > of the GLEP.
68
69 Portage doesn't do physical updates last I saw- if it did, well,
70 that's fairly dangerous. Only thing stored in the VDB is the ebuild
71 and the environment dump, and the environment dump is what's ran from.
72
73 You cannot sanely pick part the dump and try to intermix current
74 ebuilds; rephrasing, I'll kick in the head anyone who tries that.
75
76 We used to do that shit; it broke, frequently. Env saving took a long
77 time to get landed across the board- doing what you're proposing the
78 PM should do breaks those guarantess and is a step back on that front
79 alone. Basically, not happening, if it is, a series of bugs need
80 filing.
81
82 What portage does is that if it sees an ebuild in the tree that
83 matches, it uses the deps from the tree; that's wholy different from
84 what you think is happening in the vdb.
85
86 Additionally, portage is the only PM that does this; the rest of the
87 PMs treat the vdb ebuild as a constant- without extreme care, or some
88 form of insane deptree comparison, you can't just swap in what a new
89 ebuild has and expect it to work in all cases.
90
91 ~harring

Replies

Subject Author
Re: [gentoo-dev] Addressing GLEP-62 itself "Michał Górny" <mgorny@g.o>