Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Request to add ~> atom prefix operator on Portage.
Date: Mon, 14 Sep 2015 09:04:43
Message-Id: 22006.36255.215195.790901@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] Request to add ~> atom prefix operator on Portage. by Kent Fredric
1 >>>>> On Mon, 14 Sep 2015, Kent Fredric wrote:
2
3 > On 14 September 2015 at 20:01, Ulrich Mueller <ulm@g.o> wrote:
4 >> Which of the following will match the package "cat/foo-1.02.3",
5 >> and why:
6 >>
7 >> =cat/foo-1.020.3
8 >> =cat/foo-1.020.3*
9 >> =cat/foo-01.02.3*
10
11 > Of those, I only expect the last to match, because leading 0's are
12 > not typically significant.
13
14 Well, version comparison is described in [1] and it says that
15 =cat/foo-1.020.3 will match cat/foo-1.02.3.
16
17 The problem is how to read the sentence "if the version specified has
18 an asterisk immediately following it, a string prefix comparison is
19 used instead" in the specification of the = operator [2]. Does that
20 string prefix comparison apply to the whole version (then neither
21 =cat/foo-1.020.3* nor =cat/foo-01.02.3* would match), or only to its
22 last component (then both would match)?
23
24 Portage behaviour is that =cat/foo-1.020.3* doesn't match but
25 =cat/foo-01.02.3* does. Which seems to disagree with either reading of
26 the spec.
27
28 Could someone check what is Paludis's behaviour for the examples
29 above? Also, does =cat/foo-1.2* match cat/foo-1.20 in Paludis?
30
31 Ulrich
32
33 [1] https://projects.gentoo.org/pms/5/pms.html#x1-290003.3
34 [2] https://projects.gentoo.org/pms/5/pms.html#x1-840008.2.6.1

Replies

Subject Author
Re: [gentoo-dev] Request to add ~> atom prefix operator on Portage. Kent Fredric <kentfredric@×××××.com>
Re: [gentoo-dev] Request to add ~> atom prefix operator on Portage. Kent Fredric <kentfredric@×××××.com>