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 16:57:57
Message-Id: 20131208175612.2b8c7e38@TOMWIJ-GENTOO
1 Hello fellow developers
2
3 == Situation ==
4
5 When specifying a dependency like cat/pkg it will default to cat/pkg:*
6 which is defined in `man 5 ebuild` as:
7
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.
12
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).
16
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.
20
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]
24
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?
28
29 [1] https://bugs.gentoo.org/show_bug.cgi?id=493652
30 "media-libs/libsdl2: should be a SLOT=2 of media-libs/libsdl"
31
32 == Task ==
33
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.
36
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?
40
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.
45
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.
51
52 Is there anything else we need to take into account?
53
54 == Summary ==
55
56 Situation:
57
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.
61
62 Task:
63
64 Check results, correct some exceptions, update PMS, implement it.
65
66 Thank you in advance for participating in this discussion.
67
68 --
69 With kind regards,
70
71 Tom Wijsman (TomWij)
72 Gentoo Developer
73
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

Attachments

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

Replies