On Mon, Sep 14, 2015 at 4:01 PM, Ulrich Mueller <u...@gentoo.org> wrote: >>>>>> On Mon, 14 Sep 2015, Kent Fredric wrote: > >> On 14 September 2015 at 18:52, Ulrich Mueller <u...@gentoo.org> wrote: > Another interesting example: 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*
If we use an arithmetic operator like ~> then that could be decided easily. First we use a rule that all version numbers are decimal (oct is unlikely), so we simply remove the leading zeros then apply the rule accordingly, which is >=cat/foo-1.20.3 && <cat/foo-1.20.4. That would be a good solution since we can also have '=cat/foo-01.02.3*' to stay as a pure string matcher.