1 |
>>>>> On Mon, 4 Aug 2014, Michał Górny wrote: |
2 |
|
3 |
> Reasonable. However, as I see it, we'll end up having up to four |
4 |
> different operators: |
5 |
|
6 |
> - || that is deprecated yet everyone will still use it (like they don't |
7 |
> use :* right now), |
8 |
|
9 |
> - ||* that will be used scarcely, |
10 |
|
11 |
> - <<= that would be the preferred variant for compile-time switches yet |
12 |
> many people will not use it because it has different characters than |
13 |
> '||' [we could try maybe '||<' so that people will still see it as |
14 |
> replacement for '||'], |
15 |
|
16 |
> - ||= that most people would use forgetting about '<<=' [or '||<']. |
17 |
|
18 |
No, we will have only two distinct operators, namely ||* and ||=. |
19 |
Alternatively, or in addition, || could be kept but would be identical |
20 |
to ||*. |
21 |
|
22 |
> So, banning '|| ( A:= B:= )' in a future EAPI sounds reasonable. |
23 |
|
24 |
What prevents us from banning it now, by adding a repoman check? |
25 |
The || ( A:= B:= ) construct would mean that you can switch from |
26 |
provider A to provider B and back to A. Nothing would prevent you from |
27 |
choosing a different slot in the second step, which renders the := |
28 |
operator meaningless. |
29 |
|
30 |
> However, there's still the matter of setting current Portage behavior |
31 |
> because I don't we should keep the non-predictable magic. |
32 |
|
33 |
> What should be the current behavior then? Should we assume that all |
34 |
> '||' are not well-defined and need to be compile-switchable? Or try to |
35 |
> invent heuristic like I suggested? |
36 |
|
37 |
The devmanual [1] is very clear about it. || ( ) is only allowed if |
38 |
the implementation can be switched at runtime: |
39 |
|
40 |
# * fnord is merged on a system which has foo and not bar installed. |
41 |
# foo is then unmerged, and bar is installed. fnord must continue to |
42 |
# work correctly. |
43 |
# * A binary package of fnord made on a system with foo and not bar |
44 |
# can be taken and installed on a system with bar and not foo. |
45 |
|
46 |
Ulrich |
47 |
|
48 |
[1] http://devmanual.gentoo.org/general-concepts/dependencies/index.html |