Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [RFC] Moving subslot-only virtuals to a separate category to reduce confusion
Date: Sat, 30 Jan 2021 17:36:08
Message-Id: 4f52ddfc01ba779cde74fccadb0863c77c235339.camel@gentoo.org
1 Hi,
2
3 TL;DR: I'd like to move virtual/libjpeg, virtual/libudev and so on to
4 another category (e.g. lib-sover/*) to make it clear that they are used
5 for := deps and have valid use even with a single provider.
6
7
8 Right now we have at least a few packages that provide more than one
9 valid consumer-intended library, each with a different SOVERSION that is
10 bumped independently. To list a few examples:
11
12 - media-libs/libjpeg-turbo: libturbojpeg.so.0, libjpeg.so.62
13 - sys-apps/systemd: libsystemd.so.0, libudev.so.1
14 - app-text/poppler: libpoppler.so.106, libpoppler-cpp.so.0, libpoppler-
15 glib.so.8, libpoppler-qt5.so.1
16
17 The problem is that the current subslot mechanism doesn't really provide
18 for that. Laying aside possible future EAPI extensions (that are
19 debatable due to added complexity to an already complex syntax), there
20 are three commonly used possibilities here:
21
22 a. bumping subslot whenever any of SOVERSIONs change -- meaning possibly
23 unnecessary rebuilds,
24
25 b. using subslot for one of the SOVERSIONs and assuming the rest stable
26 -- this is what we do for poppler, and it's mildly confusing,
27
28 c. using additional packages to represent SOVERSION of individual
29 libraries -- this is e.g. used for libudev or libjpeg.
30
31
32 I'd like to discuss option c. in more detail. Right now, we're creating
33 additional packages in virtual/ category. This was mostly fine,
34 as the libraries in question (libjpeg, libudev) had multiple providers.
35 However, now that we've removed the old media-libs/jpeg, people get
36 the obvious idea that the virtual is no longer necessary -- except that
37 it is!
38
39 The rough idea is that the subslot of libjpeg-turbo is supposed to
40 represent the ABI version of libjpeg-turbo -- that is actually rarely
41 used. On the other hand, the subslot of libjpeg is represented by
42 virtual/jpeg. So if your package is using libjpeg.so, it should :=-
43 depend on the latter and not on the former.
44
45 The problem is that this is confusing, and if somebody doesn't know
46 the secret, he can easily consider the virtual obsolete and depend
47 on the library directly.
48
49 To make this SOVERSION-virtual concept more visible and easily
50 distinguishable from regular virtuals, I'd like to propose that we start
51 moving them into a dedicated category. For example, 'lib-sover' comes
52 to my mind. While this ofc doesn't guarantee that people will do things
53 right, it will at least make it clear that these packages are somewhat
54 different from regular virtuals and hopefully avoid making wrong
55 assumptions.
56
57 WDYT?
58
59 --
60 Best regards,
61 Michał Górny

Replies