>>>>> On Fri, 11 Nov 2016, Michał Górny wrote:

> ==, !=, <=, >= -- all consistent with one another. Same for ===,
> !==, <==, >==. Using some old ~ and = wouldn't fit that. The gain is
> greater than any benefit keeping old operator in a completely new
> syntax.

The gain is close to zero, if not even negative. I already pity new
dev candidates and their mentors:

"For equality, you must use = in a prefix context. In a postfix group
you have to use == instead. Note that == will ignore the revision
part. If you do not want that, add another equals sign to get ===.
However, for slot operators and in use conditional groups, equality is
denoted by = again. The != is a blocker in a prefix context, but in a
postfix context it means inequality, ignoring the revision."

> If you think it necessary, we can also change > to >> and to << to
> have matching length for all relevant operators. Doesn't Debian do
> that?

The problem is that you start from the premise that revisions are
somehow special. Their sole purpose is to distinguish downstream from
upstream versioning. They do not imply that the change to the package
is small. I simply don't see why we would need another set of
operators for explicit revision comparison.

So, here is a counter proposal, following the KISS principle as much
as possible:

1. Existing dependency syntax will be allowed indefinitely.

2. Version restrictions can go into a bracket delimited group
   after the package name, e.g. dev-foo/bar:4[>=4.11,<4.20].
   (Alternatively, parentheses () could be used instead of brackets.)

   a) Inside a group, the existing operators = < > <= >= ~ *
      have their established meaning.
   b) Several conditions can be combined (logical AND) with a comma.
   c) Old and new syntax must not be combined.
      For example, >=dev-foo/bar-4.11[<4.20] is not allowed.
   d) Empty [] groups are not allowed.

3. If necessary (personally, I don't think it is) we can add an
   operator for inequality with a consistent meaning in all contexts.
   Since the exclamation mark is used for blockers, <> could be used
   for that.

4. Revisions can be limited to 9999 by tree policy.

Ulrich

Attachment: pgp2sMR5sxTjE.pgp
Description: PGP signature

Reply via email to