Gentoo Archives: gentoo-dev

From: konsolebox <konsolebox@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Request to add ~> atom prefix operator on Portage.
Date: Tue, 15 Sep 2015 07:01:40
Message-Id: CAJnmqwYe=0Aw-Qsn3kX0hMcbdmz7zJV=DJfSyzCZ8edZMXQYZQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] Request to add ~> atom prefix operator on Portage. by "Manuel Rüger"
1 On Mon, Sep 14, 2015 at 9:53 PM, Manuel Rüger <mrueg@g.o> wrote:
2 > Please don't add any more syntactic sugar to dependency strings.
3 > People might become confused about stuff like this:
4 >
5 > =cat/foo-1.3.1_rc3_p20130829-r42+[!a=,!b?,c(+)]:3=
6
7 =cat/foo-xyz+ is only one of the forms (we can still consider ~> or
8 something else) but anyway, if we don't use another operator, would *
9 no longer match strings like a glob matcher? For example,
10 `=cat/foo-5.2015*` would no longer match cat/foo-5.20150102. On the
11 other hand if we still allow to match like glob but have a workaround
12 by allowing expressions like `=cat/foo-5.10.*`, we would now have to
13 use 4 lines in order to accurately specify the targets:
14 `=cat/foo-5.10`, `=cat/foo-5.10.*`, `=cat/foo-5.10-*` and
15 `=cat/foo-5.10_*`. So should we no allow [.-_]* so we can reduce them
16 to two?
17
18 (Come to think of it, the @ operator is already used by sets so we
19 can't have @cat/foo-5.10. But we can have =cat/foo-5.10@. Or
20 =cat/foo-5.10~. But the latter could be found ambiguous or
21 misinforming since ~cat/pkg-5.10 is already thought to only target
22 revisions.)
23
24 > Is there any real need to express this in a single line except for
25 > saving a single line?
26
27 There are areas where only a single expression is applicable like on a
28 CLI query, or on package.* rules where applying or disabling a flag or
29 keyword on specific version and unapplying or enabling the same flag
30 or keyword on excluded versions may not always be sensible. Having to
31 use more than a single expression adds noise and complexity.