Gentoo Archives: gentoo-dev

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies