1 |
>>>>> On Sun, 6 Nov 2016, Michał Górny wrote: |
2 |
|
3 |
> Following my previous RFC wrt version operator problems, I'd like to |
4 |
> start the second part of the discussion: how to improve version |
5 |
> operators in a Future EAPI? |
6 |
|
7 |
> I've collected various ideas on operator changes on a wiki page [1]. |
8 |
> I've tried to stay open-minded and cover every possibility, even |
9 |
> though I doubt some of them would be even considered. |
10 |
|
11 |
> I should warn you that some of the solutions are interlinked to each |
12 |
> other, and you probably need to look through the whole page first |
13 |
> before starting to construct an opinion. For example, specific |
14 |
> solutions to most of the problems depend on whether we enable |
15 |
> version ranges and in which form. |
16 |
|
17 |
> I think we should start by loosely discussing the various ideas |
18 |
> on the wiki page. Feel free to also point out any missing ideas |
19 |
> or remarks that would be useful there. |
20 |
|
21 |
> So, what are your comments? |
22 |
|
23 |
> [1]:https://wiki.gentoo.org/wiki/Future_EAPI/Version_syntax_changes |
24 |
|
25 |
Thank you for collecting these ideas. As I see it, they can be divided |
26 |
into two main categories: a) additional functionality and b) syntax |
27 |
changes. IMHO we shouldn't go for any major syntax change in b), |
28 |
unless this would be required by an important feature in a). |
29 |
|
30 |
About the items on the wiki page: |
31 |
|
32 |
> 1 Reordering to PACKAGE OP VERSION |
33 |
|
34 |
This is a purely syntactical change. We should not do this without |
35 |
good reason, i.e. additional functionality that cannot be expressed |
36 |
with existing syntax. |
37 |
|
38 |
> 2 Version ranges |
39 |
|
40 |
I think this is a feature which is needed. However, I am not so sure |
41 |
if a radical change of syntax would be necessary for it. |
42 |
|
43 |
The most pressing problem seems to be that the current syntax cannot |
44 |
specify a version range that must be within the same slot. |
45 |
Introduction of a slot binding all-of group would solve this. |
46 |
|
47 |
Looks like all the rest listed under the "version ranges" heading can |
48 |
already be expressed with existing syntax, although in a verbose way. |
49 |
So the question is if version ranges occur often enough to justify |
50 |
introduction of a new and less verbose syntax? |
51 |
|
52 |
> 3 Version suffixes and upper/lower bound problem |
53 |
|
54 |
IMHO not worth the effort. Dependencies of "<" type don't occur very |
55 |
often. Also I would expect that in most cases it will be known what |
56 |
the next version is. And if not, the relation can still be expressed |
57 |
with existing syntax (e.g. by appending an _alpha suffix). |
58 |
|
59 |
> 4 Revision-related operators |
60 |
|
61 |
Indeed we have some inconsistency there: We have ~ which is like = |
62 |
but ignoring the revision, but we don't have corresponding operators |
63 |
for the other four relations. The two ones corresponding to >= and < |
64 |
would be redundant, though (because the normal >= and < operators |
65 |
can be used with r0). This leaves us with > (ignoring revision) |
66 |
and <= (ignoring revision). |
67 |
|
68 |
Again, not sure how often this would be needed. Adding -r9999 is a |
69 |
workaround for most (all?) cases occurring in practice. |
70 |
|
71 |
Besides, what is special about revisions? A revbump potentially comes |
72 |
with changes (like a security fix) as important as any upstream bump. |
73 |
I can understand the need for the ~ operator, e.g., to keep packages |
74 |
in sync that are built from the same upstream tarball. For inequality |
75 |
relations I have doubts if we need anything revision specific. |
76 |
|
77 |
> 5 Component-wide prefix comparison |
78 |
|
79 |
I'd rather not introduce more creative ways how the * wildcard can be |
80 |
abused. Maybe it could be dropped entirely, assuming we would have |
81 |
version ranges. |
82 |
|
83 |
Ulrich |