>>>>> On Mon, 14 Sep 2015, Kent Fredric wrote: > On 14 September 2015 at 21:04, Ulrich Mueller <u...@gentoo.org> wrote: >> Well, version comparison is described in [1] and it says that >> =cat/foo-1.020.3 will match cat/foo-1.02.3.
> Surely, as per Algorithm 2, that is false, because "020" and "02" are > both integers, and therefor they'd default to integer comparison, and > "020" would be deemed ">" "02" Comparison in Algorithm 2 only takes place for the zeroth component (i.e., "1", for the example above). For all following numeric components Algorithm 3 is called. For the next component, the condition in line 1 is true, so it will remove trailing zeros (i.e., both "020" and "02" will become "02") and then it will use stringwise comparison. That is, versions 1.020.3 and 1.02.3 will be considered equal. Ulrich
pgp64ceWpGSTn.pgp
Description: PGP signature