Gentoo Archives: gentoo-dev

From: Sergey Popov <pinkbyte@g.o>
To: Tom Wijsman <TomWij@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Dependencies default to accept any slot value acceptable (:*), can we default to :0 instead?
Date: Mon, 09 Dec 2013 06:53:47
Message-Id: 52A5689F.1040402@gentoo.org
In Reply to: [gentoo-dev] Dependencies default to accept any slot value acceptable (:*), can we default to :0 instead? by Tom Wijsman
1 08.12.2013 20:54, Tom Wijsman пишет:
2 > Hello fellow developers
3 >
4 > == Situation ==
5 >
6 > When specifying a dependency like cat/pkg it will default to cat/pkg:*
7 > which is defined in `man 5 ebuild` as:
8 >
9 > * Indicates that any slot value is acceptable. In addition,
10 > for runtime dependencies, indicates that the package will not
11 > break if the matched package is uninstalled and replaced by a
12 > different matching package in a different slot.
13 >
14 > This default reflects different behavior than what we use slots for,
15 > besides allowing side-by-side installations we rather use it to
16 > specifically depend on a new major version. (eg. dev-libs/glib).
17 >
18 > Let's say I want to a add a new major version of cat/pkg to the Portage
19 > tree, introducing it in the same SLOT="0" isn't an option. This gives
20 > us two options, one is SLOT="2", the other is to create cat/pkg2 or so.
21 >
22 > Creating a new SLOT is the most sane thing going forward; but, as the
23 > default (:*) depends on any SLOT, this needs a half thousand commits to
24 > fix up reverse dependencies. Thus, instead a new package is made. [1]
25 >
26 > When our defaults force us down such path, that can't be good and it
27 > affects the quality of our Portage tree; so, this makes me wonder, can
28 > we change the default from :* to :0? What do you think?
29 >
30 > [1] https://bugs.gentoo.org/show_bug.cgi?id=493652
31 > "media-libs/libsdl2: should be a SLOT=2 of media-libs/libsdl"
32 >
33 > == Task ==
34 >
35 > If we agree we do this; in order to change :* to :0, we need to change
36 > the PMS to cover this change and implement it in the package managers.
37 >
38 > Before we do that, we need to evaluate how practical this is to apply.
39 > While we are trying to fix the default behavior, what would changing
40 > the default from :* to :0 break?
41 >
42 > One thing that directly comes to mind is that dependencies that have no
43 > SLOT="0" ebuild present would need us to manually specify a specific
44 > SLOT; given that this is a not so common situation, the amount of
45 > commits needed here is low.
46 >
47 > Another thing that comes to mind is that we need to check what to do
48 > with packages were the highest available version does not belong to
49 > SLOT="0"; technically, restricting these to SLOT="0" will not cause
50 > breakage, it might however cause some blockers. We'll have to look
51 > closer into how we can alleviate this result.
52 >
53 > Is there anything else we need to take into account?
54 >
55 > == Summary ==
56 >
57 > Situation:
58 >
59 > Defaulting to :* on SLOT-less dependencies makes it hard to add a
60 > new SLOT to a package, using :0 instead would not make this a
61 > problem and not require to fix up all reverse dependencies.
62 >
63 > Task:
64 >
65 > Check results, correct some exceptions, update PMS, implement it.
66 >
67 > Thank you in advance for participating in this discussion.
68 >
69
70 In short - please do NOT do this. More complicated answer - you break
71 the whole idea of slots. When user types 'emerge cat/foo' it means now -
72 "i want cat/foo, whatever versions it will be(depending on mask,
73 keywords, etc, etc)". Your proposal changes this behaviour drastically,
74 and reasons for such changes are not worth it.
75
76 --
77 Best regards, Sergey Popov
78 Gentoo developer
79 Gentoo Desktop Effects project lead
80 Gentoo Qt project lead
81 Gentoo Proxy maintainers project lead

Attachments

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

Replies