1 |
Dnia 20 lutego 2018 03:30:10 CET, Ian Stakenvicius <axs@g.o> napisał(a): |
2 |
>On 2018-02-19 12:34 PM, Ulrich Mueller wrote: |
3 |
>>>>>>> On Mon, 19 Feb 2018, Michael Lienhardt wrote: |
4 |
>> |
5 |
>>>> 2. ||= (binding any-of) dep groups. |
6 |
>> |
7 |
>>> I don't understand what this group means, and the PMS-7 is |
8 |
>>> unclear as well: "binding-any-of A binding-any-of group, which |
9 |
>>> has the same format as the any-of group, but begins with the |
10 |
>>> string ||= instead." Is it a "or", like the "any-of" group, but |
11 |
>>> with a different behavior at compiling/linking time? |
12 |
>> |
13 |
>> It is explained in section 8.2.4: |
14 |
>> https://dev.gentoo.org/~ulm/pms/7-draft/pms.html#x1-800008.2.4 |
15 |
>> |
16 |
>> Ulrich |
17 |
>> |
18 |
> |
19 |
> |
20 |
>Could we get some clarification/confirmation on this language?: |
21 |
> |
22 |
> |
23 |
>> In addition, for runtime dependencies, indicates that the package |
24 |
>> will break unless a matching package corresponding to the first |
25 |
>> immediate child element (in order of listing) installed as a |
26 |
>> build-time (DEPEND) dependency is available |
27 |
> |
28 |
> |
29 |
>...if I am reading this right, this means that the list of atoms is |
30 |
>iterated through first->last, and as soon as one is found to be |
31 |
>available at build-time, it chosen as the one that this package is |
32 |
>bound to and after that the package will be considered broken if it |
33 |
>doesn't exist/is later removed? |
34 |
|
35 |
Yes. Let me expand on that. Given a dep: |
36 |
|
37 |
||= ( p[0] p[1] p[2]... ) |
38 |
|
39 |
p[i] with lower i has higher priority. |
40 |
|
41 |
Implementation-wise, at the very minimum: |
42 |
|
43 |
1. PM needs to ensure that at least one of p[i] is installed (doesn't matter which one). |
44 |
|
45 |
2. PM needs to seek through p[i] at build time and record the p[i] with lowest i that was satisfied somehow (with explicit indication how it was obtained). |
46 |
|
47 |
3. PM needs to treat this p[i] as unconditional (but weak-ish) dep, i.e. 'emerge --depclean' must not remove it even if p[j], j!=i is present. |
48 |
|
49 |
4. Also, it needs to handle missing all p[i] in a non-crashing fashion, i.e. without requiring user to fix it manually. |
50 |
|
51 |
However, if we want it to do more then locking deps forever, we should also consider the following (with i!=j): |
52 |
|
53 |
1. If p[i] is locked, and p[j] is requested and blocking p[i], package should be rebuilt after installing p[j] and removing p[i]. |
54 |
|
55 |
2. If p[i] is locked, and p[j] gets installed where j<i (no blockers), PM may want to rebuild pkg to unlock p[i] (this should probably be controlled by option). |
56 |
|
57 |
3. If p[i] is locked, and p[j] is installed where j>i (no blockers), PM should provide some way of uninstalling p[i] (and rebuilding pkg afterwards). My idea was to allow blocker syntax for emerge, i.e. "emerge -1v !dev-libs/foo " which would uninstall it like a blocker and rebuild all pkgs with weak deps. |
58 |
|
59 |
-- |
60 |
Best regards, |
61 |
Michał Górny (by phone) |