Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [PATCH] eapi7-ver.eclass: 'Early adopter' version of EAPI 7 version manip
Date: Fri, 08 Sep 2017 13:48:11
Message-Id: 22962.40849.452101.448694@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] Re: [PATCH] eapi7-ver.eclass: 'Early adopter' version of EAPI 7 version manip by Ciaran McCreesh
1 >>>>> On Fri, 8 Sep 2017, Ciaran McCreesh wrote:
2
3 > On Fri, 08 Sep 2017 14:54:10 +0200
4 > Michał Górny <mgorny@g.o> wrote:
5 >> It only explains how the functions parse stuff (except for ver_test
6 >> which uses PMS rules). They are by definition supposed to work with
7 >> random upstream versions.
8
9 > This sounds like the sort of thing that could go horribly wrong...
10 > I didn't design versionator to work with arbitrary messy stuff since
11 > the main use is in manipulating Gentoo PV versions.
12
13 If we would strictly follow PMS wording there, then for _alpha, _beta,
14 _p, etc. the underscore would be part of the component. Also in a
15 suffix like _p2, _p and 2 would be separate components. However, with
16 versionator.eclass:
17
18 get_version_components 3.0_p2 -> 3 0 p2
19
20 So even there, the underscore is taken as a separator. I don't say
21 that this behaviour is bad, only that it doesn't strictly follow PMS
22 rules.
23
24 > Where are these other versions coming from?
25
26 They occur as output of those functions, and I think that e.g.
27 splitting 1.2_rc3 into components "1", "2", "rc", and "3" with
28 separators ".", "_", and "" makes more sense than treating "_rc" as an
29 atomic block.
30
31 Ulrich