>>>>> On Mon, 14 Sep 2015, Kent Fredric wrote:

> On 14 September 2015 at 20:01, Ulrich Mueller <u...@gentoo.org> wrote:
>> Which of the following will match the package "cat/foo-1.02.3",
>> and why:
>>
>>    =cat/foo-1.020.3
>>    =cat/foo-1.020.3*
>>    =cat/foo-01.02.3*

> Of those, I only expect the last to match, because leading 0's are
> not typically significant.

Well, version comparison is described in [1] and it says that
=cat/foo-1.020.3 will match cat/foo-1.02.3.

The problem is how to read the sentence "if the version specified has
an asterisk immediately following it, a string prefix comparison is
used instead" in the specification of the = operator [2]. Does that
string prefix comparison apply to the whole version (then neither
=cat/foo-1.020.3* nor =cat/foo-01.02.3* would match), or only to its
last component (then both would match)?

Portage behaviour is that =cat/foo-1.020.3* doesn't match but
=cat/foo-01.02.3* does. Which seems to disagree with either reading of
the spec.

Could someone check what is Paludis's behaviour for the examples
above? Also, does =cat/foo-1.2* match cat/foo-1.20 in Paludis?

Ulrich

[1] https://projects.gentoo.org/pms/5/pms.html#x1-290003.3
[2] https://projects.gentoo.org/pms/5/pms.html#x1-840008.2.6.1

Attachment: pgpWOUt20Onhi.pgp
Description: PGP signature

Reply via email to