Gentoo Archives: gentoo-dev

From: Tom Wijsman <TomWij@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Dependencies default to accept any slot value acceptable (:*), can we default to :0 instead?
Date: Sun, 08 Dec 2013 17:11:28
Message-Id: 20131208175438.100112a0@TOMWIJ-GENTOO
1 Hello fellow developers
3 == Situation ==
5 When specifying a dependency like cat/pkg it will default to cat/pkg:*
6 which is defined in `man 5 ebuild` as:
8 * Indicates that any slot value is acceptable. In addition,
9 for runtime dependencies, indicates that the package will not
10 break if the matched package is uninstalled and replaced by a
11 different matching package in a different slot.
13 This default reflects different behavior than what we use slots for,
14 besides allowing side-by-side installations we rather use it to
15 specifically depend on a new major version. (eg. dev-libs/glib).
17 Let's say I want to a add a new major version of cat/pkg to the Portage
18 tree, introducing it in the same SLOT="0" isn't an option. This gives
19 us two options, one is SLOT="2", the other is to create cat/pkg2 or so.
21 Creating a new SLOT is the most sane thing going forward; but, as the
22 default (:*) depends on any SLOT, this needs a half thousand commits to
23 fix up reverse dependencies. Thus, instead a new package is made. [1]
25 When our defaults force us down such path, that can't be good and it
26 affects the quality of our Portage tree; so, this makes me wonder, can
27 we change the default from :* to :0? What do you think?
29 [1]
30 "media-libs/libsdl2: should be a SLOT=2 of media-libs/libsdl"
32 == Task ==
34 If we agree we do this; in order to change :* to :0, we need to change
35 the PMS to cover this change and implement it in the package managers.
37 Before we do that, we need to evaluate how practical this is to apply.
38 While we are trying to fix the default behavior, what would changing
39 the default from :* to :0 break?
41 One thing that directly comes to mind is that dependencies that have no
42 SLOT="0" ebuild present would need us to manually specify a specific
43 SLOT; given that this is a not so common situation, the amount of
44 commits needed here is low.
46 Another thing that comes to mind is that we need to check what to do
47 with packages were the highest available version does not belong to
48 SLOT="0"; technically, restricting these to SLOT="0" will not cause
49 breakage, it might however cause some blockers. We'll have to look
50 closer into how we can alleviate this result.
52 Is there anything else we need to take into account?
54 == Summary ==
56 Situation:
58 Defaulting to :* on SLOT-less dependencies makes it hard to add a
59 new SLOT to a package, using :0 instead would not make this a
60 problem and not require to fix up all reverse dependencies.
62 Task:
64 Check results, correct some exceptions, update PMS, implement it.
66 Thank you in advance for participating in this discussion.
68 --
69 With kind regards,
71 Tom Wijsman (TomWij)
72 Gentoo Developer
74 E-mail address : TomWij@g.o
75 GPG Public Key : 6D34E57D
76 GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D


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