Gentoo Archives: gentoo-dev

From: Ian Stakenvicius <axs@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [gentoo-portage-dev] About forcing rebuilds of other packages issue
Date: Fri, 07 Sep 2012 17:56:36
Message-Id: 504A341C.1080207@gentoo.org
In Reply to: Re: [gentoo-dev] [gentoo-portage-dev] About forcing rebuilds of other packages issue by Fabian Groffen
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 On 07/09/12 01:13 PM, Fabian Groffen wrote:
5 > On 06-09-2012 09:25:53 -0400, Ian Stakenvicius wrote:
6 >> #1 - there is both a specification, and an initial
7 >> implementation, AND a fork of the tree that is kept
8 >> semi-up-to-date on my dev overlay.
9 >
10 > I was interested in a (formal) specification, not a proof of
11 > concept.
12 >
13
14 Ahh.. sorry, i figured the modified slot-operator spec that Ciaran
15 and Zac did was considered formal. Are you looking for a GLEP, then?
16 or...
17
18
19 >> #2 - related to your question about what the proposal solves --
20 >> in my opinion, the biggest thing the proposal solves is the case
21 >> where we want the ability to use SLOTs in the tree to manage and
22 >> track dependency changes (ie, when an API or ABI has changed),
23 >> but NOT allow multiple versions of a package to be installed at
24 >> the same time. Further to this, it allows PMs to determine what
25 >> needs to be rebuilt due to the old (no longer existing) dep being
26 >> supported prior to said dep actually being removed.
27 >
28 > ...
29 >
30 >> sub-slots is the 'some-identifier' part of
31 >> ${SLOT}/${some-identifier}. It doesn't have to replate to ${PV}
32 >> at all, and generally shouldn't. More likely it should relate to
33 >> the ${major}.${minor} in the main library's SONAME. For
34 >> non-libtool dependencies some other form of id is used, ie for
35 >> perl I used the major.minor from $PV.
36 >
37 >> EAPI="4-slot-deps" is new to me; the implementation i've been
38 >> testing
39 >
40 > You refer to it lateron, so it seems to me you're unaware your
41 > sub-slots and slot-deps are made as one commit [1].
42 >
43
44 if you s/slot-deps/slot-operators/ , then yes i'm aware. to me,
45 "slot-deps" is something we got in (iirc) EAPI=2.
46
47
48
49 >> is EAPI="4-slot-abi" which is sub-slots and slot operators. This
50 >> is the spec that was written and proposed for EAPI=5 and so this
51 >> is what i'll use to describe the above.
52 >
53 > both are proposed for EAPI=5 [2]
54 >
55 >> First, assuming currently libfnord is SLOT=0, and that there are
56 >> no ABI/API breakages on libfnord-2 through libfnord-3.5, I would
57 >> just use the ${major} version from the SONAME for the sub-slot.
58 >> IE:
59 >>
60 >> libfnord-1:SLOT="0/3" libfnord-2:SLOT="0/5"
61 >> libfnord-2.1:SLOT="0/5" ... libfnord-3.5:SLOT="0/5"
62 >>
63 >> And then, assuming that foo and bar both link in the usual way,
64 >> IE they link against libfnord.so.3 instead of just libfnord.so ,
65 >> they
66 >
67 > SONAME indeed refers to the versioned lib, although linking is of
68 > course done against libfnord.so (-lfnord).
69 >
70
71 When looking at the output of 'scanelf -n' on a binary or library,
72 dependent libs seem usually to be linked against libfnord.so.X rather
73 than libfnord.so ; hence the breakage when upgrading from a
74 libfnord.so.3 provider to a libfnord.so.5 provider. I'm sure you're
75 aware of that, just trying to clarify what I meant above.
76
77
78 >> both would RDEPEND as follows:
79 >>
80 >> RDEPEND="app-cat/libfnord:="
81 >
82 > This is "Slot operator dependencies" syntax.
83 >
84
85 ...and?
86
87 >>> (numeric indicators added): [1]What if libfnord-2.1 or
88 >>> libfnord-3.5 would be masked due to some problem not noticed
89 >>> prior to stabling that makes it useless for many users.
90 >>> [2]bar-2.4 during configure checks for a new function in
91 >>> libfnord-3.5 and uses it if available, or uses an alternative
92 >>> code-path instead. [3]libfnord-2.1-r5 fixes a crash in some
93 >>> function of the library. (Note: this whole example/question
94 >>> sounds like an ebuild-quiz question that any dev should be able
95 >>> to answer then.)
96 >>>
97 >>> What would be the advantage of sub-slot here, assuming the
98 >>> versioning of the libraries follows ABI versioning rules
99 >>> defined by e.g. libtool.
100 >>
101 >> [1] No advantage as sub-slots wouldn't relate to this, UNLESS
102 >> the masking would then remove -all- SLOT="0/5" versions from the
103 >> tree. In that case, the old SLOT="0/3" provider would be the
104 >> 'upgrade' path and so 'foo' and 'bar' would be triggered for
105 >> rebuild (since the lib they were linked to would be disappearing
106 >> during emerge -uDN)
107 >
108 > So your example SLOTs are wrong, and should have included the
109 > minor (always!?!) since downgrading a lib that goes back to an
110 > older minor means functions no longer exist, thus a consumer can
111 > potentially break.
112 >
113
114 If those (missing) functions are necessary then the either the full
115 slot, or the particular minimum package version, of libfnord would
116 need to be specified in the consumer. This isn't any different from
117 how things work now.
118
119 IE, if foo works fine when being built against either libfnord-1 or
120 libfnord-2 , then the := slot operator will trigger a rebuild when
121 libfnord upgrades or downgrades. That's its point. If foo needs
122 functions that only libfnord-2 provides then it needs a dep of
123 > =libfnord-2 , or alternatively libfnord:0/5 .
124
125
126 >> [2] In this case, the new ABI/API offering in libfnord-3.5 would
127 >> need to be addressed in the SLOT, ie, SLOT="0/5.12". As such
128 >> when libfnord-3.5 would be upgraded then bar-2.4 (if it was
129 >> already emerged of course) would be triggered for rebuild. 'foo'
130 >> would afaik also be triggered for rebuild, though, as (at
131 >> present) there isn't a way to match partial sub-slots (or
132 >> sub-sub-slots, as it were) via the slot operators := and :*.
133 >
134 > So you basically say: this is slot-dep, you store that bar-2.4
135 > uses libfnord-2.1.
136 >
137
138 No, we store that bar-2.4 uses libfnord:0/5
139
140 This is why, for the rebuild of bar-2.4 to be triggered on upgrade to
141 libfnord-3.5 the SLOT= var within libfnord-3.5.ebuild would need to
142 have something other than SLOT="0/5", ie, SLOT="0/5.12"
143
144
145
146 >> [3] No advantage, as linking would be consistent. Sub-slots
147 >> wouldn't be needed in this case, and afaict updating libfnord-2.1
148 >> to libfnord-2.1-r5 wouldn't trigger revdep-rebuild or require
149 >> any additional mediation anyways.
150 >
151 > Yes.
152 >
153 >> Hope this helps clear things up..
154 >
155 > I think I understand why ciaramn suggested the use of / iso
156 > SUB_SLOT (or something like that) here.
157 >
158 > Could you give an example where implicit ${PV} as sub-slot would
159 > not do what you need?
160
161
162 Explicit ${PV} would result in needless rebuilds due to sub-slot
163 changes in your libfnord example above. IE, there is no reason for a
164 package that has a basic RDEPEND="app-cat/libfnord:=" to be rebuilt
165 except when libfnord is upgraded from libfnord-1 to >libfnord-1 ;
166 whereas if ${PV} -were- to be the sub-slot, then rebuilds would happen
167 on every version bump.
168
169
170 >
171 > Do you allow sub-slot to depend on e.g. USE-flags in use? Suppose
172 > libfnord has a USE-flag cow that adds special cow interfaces to
173 > the ABI/API. Would SLOT="X/${PV}$(use cow && echo -- -cow)" work?
174 > (I think SLOT is supposed to be metadata-static, but does the
175 > sub-slot part count to that?)
176
177 No, afaik slots (including sub-slots) can't be dynamic. Plus we
178 already have comprehensive use deps solutions so why would we need that?
179
180 -----BEGIN PGP SIGNATURE-----
181 Version: GnuPG v2.0.19 (GNU/Linux)
182
183 iF4EAREIAAYFAlBKNBwACgkQ2ugaI38ACPBsOQEAsFeayfviF743E9+6M06nRFiN
184 Zoz58P1VIIUxR8QdqEoA/RU7OaoIlMDbTOAwuxIuRY2lj0hUI2zVfCk09u58l1Yv
185 =zKWs
186 -----END PGP SIGNATURE-----

Replies

Subject Author
[gentoo-dev] Re: sub-slots (for EAPI 5) Fabian Groffen <grobian@g.o>