1 |
First of all thank you for the research and wish you a good luck in |
2 |
making the changes happen. |
3 |
|
4 |
|
5 |
## Reordering to PACKAGE OP VERSION |
6 |
|
7 |
<cat/pkg> [<operator> <version>] [:<slot>] |
8 |
|
9 |
is more sane than |
10 |
|
11 |
<cat/pkg> [:<slot>] [<operator> <version>] |
12 |
|
13 |
even though it's not so "hierarchically correct". |
14 |
|
15 |
Thus instead of writing |
16 |
|
17 |
dev-foo/bar:4===4.1 |
18 |
|
19 |
one would write |
20 |
|
21 |
dev-foo/bar==4.1*:4= |
22 |
|
23 |
which is nicely readable. |
24 |
|
25 |
But in case the box brackets notation gets incorporated (as in Exheres), |
26 |
|
27 |
<cat/pkg> [:<slot>] [[<operator> <version>]] |
28 |
|
29 |
is the way to go. |
30 |
|
31 |
|
32 |
## Version ranges |
33 |
|
34 |
dev-foo/bar:0[(>=2 && <4) || (>=6 && <10)][baz?] |
35 |
|
36 |
looks the most promising to me as it allows to include and exclude any |
37 |
number of ranges. |
38 |
|
39 |
|
40 |
## Things not included |
41 |
|
42 |
### Comments/annotations |
43 |
|
44 |
Currently, there is no way to put inline comments to *DEPEND, IUSE, |
45 |
..., thus the only supported way is to put the comments above the |
46 |
specification and somehow tell the reader what part of the |
47 |
specification is the comment about. For 3-4 deps it's acceptable, for |
48 |
20+ it's insane and thus no one does it, losing valuable information |
49 |
about the reasoning by doing so. |
50 |
|
51 |
Mu current workaround is: |
52 |
|
53 |
DEPEND_A=( |
54 |
# comment |
55 |
"cat/pkg..." |
56 |
"|| (" |
57 |
# comment |
58 |
"cat/foo" |
59 |
"cat/bar" |
60 |
")" |
61 |
) |
62 |
DEPEND="${DEPEND_A[*]}" |
63 |
|
64 |
|
65 |
### Logical operators for groups |
66 |
|
67 |
#### OR |
68 |
|
69 |
Currently there is no way to specify: |
70 |
|
71 |
foo||bar? ( |
72 |
cat/pkg |
73 |
) |
74 |
|
75 |
and one has to copy&paste a lot: |
76 |
|
77 |
foo? ( |
78 |
cat/pkg |
79 |
) |
80 |
bar? ( |
81 |
cat/pkg |
82 |
) |
83 |
|
84 |
#### AND |
85 |
|
86 |
AND can be specified via nested groups: |
87 |
|
88 |
foo? ( |
89 |
bar? ( |
90 |
cat/pkg |
91 |
) |
92 |
) |
93 |
|
94 |
but this syntax is verbose and not explicit. |
95 |
|
96 |
foo&&bar? ( |
97 |
cat/pkg |
98 |
) |
99 |
|
100 |
would be much more readable. |