Gentoo Archives: gentoo-dev

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] JFYIOR: A Simple Package Versioning Spec
Date: Sat, 19 Sep 2015 01:02:30
Message-Id: CAATnKFCkkDbgKXXqCEUPkzmkbTZ5_epo8k7cfgEkK3XLWU7XuA@mail.gmail.com
In Reply to: Re: [gentoo-dev] JFYIOR: A Simple Package Versioning Spec by konsolebox
1 On 19 September 2015 at 10:09, konsolebox <konsolebox@×××××.com> wrote:
2 > As for A6FGHKE and TRIAL, it's impossible to tell their actual level
3 > values so even if we choose to map them lexicographically, we would
4 > still not be able to use a universal algorithm that could tell how it
5 > affects the base version (just like how stages affects it) and how it
6 > compares with other values as well. So it would still be up to the
7 > maintainer how he would represent the versions on ebuilds.
8 >
9 > One could do:
10 >
11 > Math-BaseCnv-1.6.20YYMMDD
12 >
13 > and
14 >
15 > Ubic-1.58.01.20YYMMDD or Ubic-1.58.01_pre20YYMMDD
16
17
18 And both of those translations would be wrong.
19
20 Math::BaseCnv's version is illegal even by Perl standards, but it uses
21 it anyway.
22
23 And that also means the is no way in Perl to declare you need
24 1.6.A6FG, any such dependency will either be treated as impossible to
25 satisfy, or satisfiable by all versions, and there is no way to even
26 *sort* versions that have invalid string components. Using a date
27 based segment in Gentoo will allow us to package the component itself,
28 but date order doesn't actually imply version order, they're just
29 highly similar. Which basically means even *if* we normalise it
30 somehow, any dependency we have on it in tree is just waiting to be
31 wrong.
32
33 Fortunately, cases like that are rare, and the associated yelling in
34 bug reports are preferred avoided.
35
36 And in the latter case, the "TRIAL" component is not actually part of
37 the version, but is itself a release-grade specifier, and just
38 so happens to be part of the *archive* name.
39
40 This is because CPAN upstream are not "archive" oriented dependencies,
41 but *module* oriented dependencies.
42
43 And an archive can have >1 modules and they may not all have the same version.
44
45 Hence, http://cpansearch.perl.org/src/MMCLERIC/Ubic-1.58_01-TRIAL/
46
47 Is actually just "1.58_01" + Alpha signifier
48
49 Which here is redundant, because the "_" is an alpha signifier as
50 well, and is deemed invisible in perl code.
51
52 Alas, there's a horrible historical bug in version.pm that stupidly
53 treats "_" in any version as significant.
54
55 But either way, the right way to nomalise those versions is to elide
56 the _ and '-TRIAL' parts.
57
58 So the version is in fact: 1.5801 + ALPHA grade
59
60 And then you get to the horror of the fact CPAN has *2* versioning schemes:
61
62 MAJOR.FLOATINGPART
63
64 DECIMAL.DECIMAL.
65
66 Which means:
67
68 1.58.1 is less than 1.58
69
70 Why?
71
72 Because 1.58.1 would be 1.058001 ( decimal to float conversion )
73 And 1.58 would be 1.580000 ( float not converted due to only 2 parts )
74
75 This is the horror of mixing too many version schemes into the same namespace.
76
77 You get recurrent horrible gotchas that nobody intends on making, and
78 makes repeatedly.
79
80 The collective experience of Perl/CPAN and versions is that the
81 toolchain operators
82 wish we'd only ever had one version scheme, because there are just
83 *so* *many* *ways*
84 to confuse yourself when you switch from one scheme to another
85 thinking its fine.
86
87 And there are *so* *many* *ways* to royally cock it up, or do it the
88 best way possible, and then have
89 a downstream vendor not understand the reality of perl versions and
90 then have downstream make a mess of it.
91
92 For instance, downstreams without education are tend to see:
93
94 1.1, 1.10 , 1.2, 1.20
95
96 as:
97
98 1.1 , 1.2, 1.10, 1.20
99
100 When in reality, 1.10 = 1.10, and 1.2 == 1.20
101
102 In short: I'd rather Gentoo just had a tighter version scheme and good
103 tooling to allow mapping from one-scheme to another
104 on a case-by-case basis with forced normalised versions on the package itself.
105
106 Perl Herd are doing just that because it greatly simplifies version
107 interactions.
108
109
110 --
111 Kent
112
113 KENTNL - https://metacpan.org/author/KENTNL

Replies

Subject Author
Re: [gentoo-dev] JFYIOR: A Simple Package Versioning Spec Raymond Jennings <shentino@×××××.com>