Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Dynamic dependencies
Date: Fri, 18 Sep 2015 00:23:10
Message-Id: pan$a9ab0$e4eb2a8$8e4083ef$b931388c@cox.net
In Reply to: Re: [gentoo-dev] Dynamic dependencies by Ciaran McCreesh
1 Ciaran McCreesh posted on Thu, 17 Sep 2015 20:31:36 +0100 as excerpted:
2
3 > On Thu, 17 Sep 2015 20:14:59 +0100 Markos Chandras <hwoarang@g.o>
4 > wrote:
5 >> could someone explain what the dynamic dependencies are in the context
6 >> of portage and ebuilds? because that does seem to be something
7 >> portage-internal specific in the way it handles changes in {,R}DEPEND
8 >> without revbumps. Where is this thing documented in the first place?
9 >
10 > Sometimes, Portage will sort of use the dependencies specified in an
11 > ebuild rather than the dependencies specified in VDB for certain
12 > operations under certain conditions and certain phases of the moon,
13 > except when it doesn't. This is a quirk left over from the olden days,
14 > when Portage could only handle the existence of one version of any given
15 > package, and so couldn't cope with there being something called foo-1.2
16 > in VDB and something else called foo-1.2 in the tree. This bug was
17 > largely fixed when env saving meant that eclasses no longer had to
18 > remain compatible with things in VDB, but traces of it still remain to
19 > cause confusion.
20
21 [There's discussion of a potential news item below. People familiar with
22 the dynamic-deps discussion in general may wish to skip to it. See under
23 the "Possible News item?" heading.]
24
25 Additionally, AFAIK, portage entirely disables dynamic-deps and uses
26 static deps any time subslots are used. Until the introduction of sub-
27 slots, portage did enough dynamic-dep calculation that devs could and did
28 normally assume it, creating problems for static-dep PMs and the
29 occasions when portage switched to static-deps. Static vs. dynamic deps
30 assumption still causes problems, but because subslots disable dynamic-
31 deps and they are now relatively common, static-deps have gradually
32 become the general experience, and assumption of dynamic-deps has
33 gradually become more of a problem than assumption of static-deps, the
34 problem being that the cases in which one can avoid revbumping are
35 slightly different with each, in ways that not everybody finds easy to
36 understand, let alone keep in mind every time they write or change a dep.
37
38 So at some point, the portage devs proposed switching everything over to
39 static deps, simplifying things for everyone and allowing them to drop
40 the dynamic-deps code. But back when it was originally proposed, subslots
41 were new and not yet widely used, and people used to the old dynamic-deps
42 way protested. (And FWIW, certain political histories definitely didn't
43 help.)
44
45 So council was called in, and it asked the portage folks to take some
46 steps that, portage development being what it is, had the effect of
47 slowing down and delaying things for long enough that, hopefully, people
48 have had time to come to terms with the changes, and with a bit of
49 familiarity, see static-deps aren't so bad, after all.
50
51 So now that subslots, and with them, static-dep handling, have become
52 more common, hopefully people will see the benefits of getting rid of
53 dynamic-deps entirely, thus simplifying things for both the portage devs
54 and gentoo package maintainers in general, since there won't be two
55 rather similar but annoyingly different in small details sets of deps-
56 resolution and corresponding revbump rules, to keep track of.
57
58 The one big remaining technical sub-problem to resolve is eclasses that
59 specify rdeps, since with static deps, changes there can have pretty huge
60 effects, potentially forcing many rebuilds. (Personally, I don't see the
61 virtuals thing as so much of an issue, since at worst, their effect tends
62 to be rebuild of the single package filling the virtual, basically the
63 same effect it has at the ebuild level. Eclasses, OTOH...) But that
64 seems to be being worked thru in this thread, and a reasonable conclusion
65 seems within reach. =:^)
66
67
68 Possible News item?
69
70 Beyond that, there's one other issue nagging at me, that I've not yet
71 seen discussed, likely because it would have been premature, previously.
72
73 What's the effect on a normal user going to be, and should there be a
74 news item? As of now, there's a warning attached to the --dynamic-deps=n
75 option in the emerge manpage, suggesting a fixpackages run if it's
76 enabled. If that's still recommended, switching to static-deps by
77 default, and ultimately dropping dynamic-deps, really should trigger a
78 news item suggesting that fixpackages run, for those with FEATURE buildpkg
79 or buildsyspkg, anyway.
80
81 Additionally, from my own experience but AFAIK entirely undocumented,
82 possibly due to my use of --with-bdeps=y, despite also having --newuse
83 and consistently using --update --deep, switching to static-deps
84 triggered a rebuild of a lot of packages depending on (IIRC) automake,
85 because the way static-deps resolved it changed. I didn't expect that
86 because as I said, I normally update deep using newuse, so /thought/ I
87 should be current, but apparently dynamic-deps wasn't as strict there as
88 static-deps are.
89
90 I /think/ the --changed-deps option might avoid dealing with that
91 manually now, so should it be enabled by default, and/or mentioned in the
92 news item? In any case, mentioning in the news item that a few extra
93 rebuilds might be expected with this upgrade, and/or suggesting they be
94 done previous to it (suggesting a --changed-deps run) could be wise.
95
96 Meanwhile, --changed-deps also invokes --selective by default, which will
97 be a big change of behavior for many. If --changed-deps is suggested in
98 the news item (or becomes the default), the effect of --selective
99 probably needs discussed as well.
100
101 Which probably is too much to easily fit a news item. In such cases, the
102 news item generally becomes a brief overview, with a link to (now) a wiki
103 page, with further detail.
104
105 --
106 Duncan - List replies preferred. No HTML msgs.
107 "Every nonfree program has a lord, a master --
108 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-dev] Re: Dynamic dependencies Rich Freeman <rich0@g.o>
Re: [gentoo-dev] Re: Dynamic dependencies Zac Medico <zmedico@g.o>