Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] About forcing rebuilds of other packages issue
Date: Wed, 06 Jun 2012 10:14:39
Message-Id: 4FCF2D5F.3080902@gentoo.org
In Reply to: Re: [gentoo-dev] About forcing rebuilds of other packages issue by Pacho Ramos
1 On 06/06/2012 02:48 AM, Pacho Ramos wrote:
2 > El mié, 06-06-2012 a las 02:17 -0700, Zac Medico escribió:
3 >> On 06/06/2012 01:28 AM, Pacho Ramos wrote:
4 >>> El mar, 05-06-2012 a las 16:07 -0700, Zac Medico escribió:
5 >>>> The "SLOT operator" dependencies that Ciaran has been advocating are
6 >>>> very close to a good solution. However, if we want it to work with
7 >>>> unslotted packages, then we need to introduce a separate ABI_SLOT
8 >>>> variable as discussed here:
9 >>>>
10 >>>> https://bugs.gentoo.org/show_bug.cgi?id=192319#c18
11 >>>>
12 >>>> It's really no more difficult to do than "SLOT operator" dependencies,
13 >>>> it's more flexible, and we can do it in EAPI 5.
14 >>>
15 >>> In that case, I obviously wouldn't have any problem with that approach
16 >>> (it sound even better :)). Is there any place where I could get a bit
17 >>> more documentation about how this "SLOT operator" way would work? For
18 >>> example, how would work for rebuilding x11 drivers after updating xorg
19 >>> or rebuilding gobject-introspection after major glib update...
20 >>
21 >> Whenever you have an ABI change, the developer doing the version bump
22 >> needs to increment the SLOT (or ABI_SLOT if we use a separate variable)
23 >> in the package. Packages that depend on the package with the ABI change
24 >> (reverse dependencies) append a := operator to their dependency atoms,
25 >> indicating that they are locked to the ABI of the SLOT that they are
26 >> built against. The package manager translates the := operators into a
27 >> dependencies on specific SLOTs at build time, so that when you update
28 >> your system next time, it can use this information to trigger rebuilds
29 >> automatically when necessary.
30 >
31 > That looks nice, only two notes:
32 > - Looks like would be more sense on distinguish between "SLOT" and
33 > ABI_SLOT, for example:
34 > * dbus-glib would rdepend on glib:2
35 > * if glib:2 abi changes, we would pull a ABI_SLOT="2.32" inside glib-2
36 > ebuild
37 > * dbus-glib rdepending on glib:=2 would get rebuilt
38 > If we would use "SLOT" for all the cases, how would we handle it? I
39 > mean, glib slot would be bumped to "2.32" and dbus-glib ebuilds updated
40 > to rdepend on every new slot? Or would package managers distinct between
41 > "versions" inside the same SLOT variable?
42
43 For this situation, it seems like it's easier to have separate SLOT and
44 ABI_SLOT entities. Maybe the dbus-glib dependency would be expressed as
45 glib:2:= and the package manager would translate that to glib:2:2.32 at
46 build time. So, the atom has separate SLOT and ABI_SLOT parts.
47
48 > - What would occur with packages forced to use eapi0 due backwards
49 > compat? We could probably deprecate eapis older than 5 to allow all the
50 > tree be consistent with this rebuilds forcing, but no idea what to do
51 > with system packages still needing to use eapi0 and maybe changing their
52 > ABI too :/
53
54 All EAPIs have SLOT, so at least the reverse dependencies on these
55 system packages would be able to use SLOT operator deps. It's also
56 conceivable that ABI_SLOT support could be retroactively added to older
57 EAPIs.
58
59 Obviously, the SLOT operator := dependencies themselves can only be used
60 in new EAPIs, so you won't be able to use them until you're willing to
61 bump the EAPI of your package.
62 --
63 Thanks,
64 Zac