Gentoo Archives: gentoo-dev

From: Pacho Ramos <pacho@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Subslots: should they be bumped like SONAME or on any ABI changes?
Date: Mon, 16 Jun 2014 09:44:17
Message-Id: 1402911843.2466.7.camel@belkin5
In Reply to: [gentoo-dev] Subslots: should they be bumped like SONAME or on any ABI changes? by "Michał Górny"
1 El sáb, 14-06-2014 a las 16:41 +0200, Michał Górny escribió:
2 > Hi,
3 >
4 > Some time ago we've got bug #510780 [1] asking us to bump subslot
5 > on LLVM even though the new version was ABI-compatible with previous
6 > one. It was because it introduced new APIs which applications could
7 > make use of. Since I believe this is a wider issue, I would like to
8 > know the opinion of our community about this.
9 >
10 > More specifically: do we want subslots to change only when backwards-
11 > incompatible ABI changes are done -- alike SONAME -- or whenever any
12 > ABI change is done? The problem seems a bit complex.
13 >
14 > Considering the libtool versioning, there are two kinds of library
15 > bumps relevant to us:
16 >
17 > 1) when ABI is altered in backwards-compatible way (so old stuff is not
18 > touched),
19 >
20 > 2) when ABI is altered in backwards-incompatible way.
21 >
22 > Option 1) corresponds to bumping minor libtool version, option 2) to
23 > bumping SONAME. I think most of the packages follow SONAME in subslots
24 > and therefore care only about 2).
25 >
26 > If we decide to keep bumping subslots only when SONAME changes, this
27 > has two implications:
28 >
29 > a) new features introduced libraries are not used by packages built
30 > prior to upgrading the library,
31 >
32 > b) packages built after upgrading the library may be broken when it is
33 > downgraded (if they use the newer ABI).
34 >
35 > I think a) is not *that* a big deal since usually new ABIs involve new
36 > APIs, and those involve code changes in the reverse dependency. Then we
37 > can usually assume that the new version of reverse dependency will be
38 > added (and therefore upgraded to) after the library in question.
39 >
40 > I have no strong opinion about b). This is a known issue with SONAMEs,
41 > and I'm not sure if we really support people downgrading. It is worth
42 > noting, however, that sometimes we ourselves force downgrades due to
43 > issues with new versions.
44 >
45 > If we decide to bump subslots to match major+minor ABI version, we
46 > force the reverse dependencies to always use the ABI corresponding to
47 > installed library version. However, this means that we force much more
48 > rebuilds than necessary.
49 >
50 > For example, glib-2 often introduces new APIs while packages obviously
51 > don't use them immediately or at all. We will be forcing rebuild of
52 > every reverse dependency at glib-2 upgrade, while the user will most
53 > likely need to wait for another version bump (and rebuild) to get
54 > the new glib-2 features used.
55 >
56 > What do you think?
57 >
58 > [1]:https://bugs.gentoo.org/show_bug.cgi?id=510780
59 >
60
61 I would opt for forcing rebuilds only when necessary, I mean, when not
62 rebuilding them will cause issues. If people want to force packages to
63 use latest glib-2 (for example), I guess they can do that "manually" (as
64 the case of people rebuilding everything on every major gcc update)