1 |
Tiziano Müller schrieb: |
2 |
> Hi everyone |
3 |
> |
4 |
> I'd like to bring bug #229521 to your attention and see whether we can |
5 |
> come up with a solution for it. |
6 |
> |
7 |
> The problem: |
8 |
> A package "foo" depends on a slotted package "bar" _and_ more than one |
9 |
> slot of "bar" can satisfy this dependency. |
10 |
> |
11 |
> Why this is a problem: |
12 |
> If the dependency looks like one of the following: |
13 |
> * DEPEND=">=cat/bar-2" |
14 |
> * DEPEND="<=cat/bar-3" |
15 |
> * DEPEND="|| ( cat/bar:2 cat/bar:3 ) |
16 |
> then the package manager doesn't know after building "foo" which slot of |
17 |
> "bar" has been used to build "foo". On the other hand might this |
18 |
> information be needed to debug problems with package "foo". |
19 |
> |
20 |
> The problem gets even worse as soon as RDEPEND comes in: |
21 |
> (assuming the same examples from above but with RDEPEND) |
22 |
> * The package manager currently doesn't record which slot has been used |
23 |
> and can't therefore track whether the user will destroy something in |
24 |
> case he uninstalls one of the slots of "bar" |
25 |
> * The package manager can't sanely consider whether an update for a slot |
26 |
> is actually needed |
27 |
|
28 |
There is a section in PMS, that tries to address this. |
29 |
|
30 |
================= |
31 |
Slot Dependencies |
32 |
A named slot dependency consists of a colon followed by a slot name. A |
33 |
specification with |
34 |
a named slot dependency matches only if the slot of the matched package |
35 |
is equal to the slot |
36 |
specified. If the slot of the package to match cannot be determined |
37 |
(e.g. because it is not a |
38 |
supported EAPI), the match is treated as unsuccessful. |
39 |
An operator slot dependency consists of a colon followed by one of the |
40 |
following operators: |
41 |
* Indicates that any slot value is acceptable. In addition, for runtime |
42 |
dependencies, indicates |
43 |
that the package will not break if the matched package is uninstalled |
44 |
and replaced by a |
45 |
different matching package in a different slot. |
46 |
= Indicates that any slot value is acceptable. In addition, for runtime |
47 |
dependencies, indicates |
48 |
that the package will break unless a matching package with slot equal to |
49 |
the slot of the |
50 |
best installed version at the time the package was installed is available. |
51 |
To implement the equals slot operator, the package manager will need to |
52 |
store the slot of the |
53 |
best installed version of the matching package. The package manager may |
54 |
do this by appending |
55 |
the appropriate slot after the equals sign when saving the package’s |
56 |
dependencies. This syntax |
57 |
is only for package manager use and must not be used by ebuilds. |
58 |
================= |
59 |
|
60 |
So, if you go with that, the dependency would look like this: |
61 |
DEPEND=">=cat/bar-2:=" |
62 |
|
63 |
That means, that it accepts any slot of versions above version 2, but |
64 |
restricts it to the slot it has been built against, at runtime. |
65 |
The combination of >= and := might look a bit ugly, so maybe it might |
66 |
indeed be useful to specify a way to provide a list of slots. |
67 |
But it would work in most cases. |
68 |
|
69 |
Regards, |
70 |
Bernd |
71 |
|
72 |
-- |
73 |
gentoo-dev@l.g.o mailing list |