Gentoo Archives: gentoo-dev

From: Kent Fredric <kentfredric@×××××.com>
To: Corentin Chary <iksaif@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] euscan GSoC project - requesting feedback
Date: Fri, 29 Jun 2012 16:55:16
Message-Id: CAATnKFAAGqNz+-mknJ-vFyGyBdJ+KNVwhHUWZxP=p3EHnO4LaQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] euscan GSoC project - requesting feedback by Corentin Chary
1 On 30 June 2012 00:13, Corentin Chary <iksaif@g.o> wrote:
2
3 > It's already the case:
4 > https://github.com/iksaif/euscan/blob/master/pym/euscan/handlers/cpan.py
5 > but my mangling functions are probably broken in some cases. If
6 > somebody with a better knowledge of CPAN versionning scheme could fix
7 > them it would be great !
8 >
9 > Thanks,
10
11 The thing is there isn't a true versioning scheme for CPAN, just a
12 defacto one agreed upon by the community. There are several
13 versioning schemes in employ, but the mechanics of each are rather
14 messy, and then you have some lovely fellow like pip come along and
15 put garbage in their version, and we have to handle it manually.
16
17 For the most part though, people use "sensible" versions of a very few
18 basic varieties, and we downstream normalise these smattering of
19 varieties into a single form to make everything nice and tidy. Its
20 still a work in progress migrating older ebuilds to our new
21 normalisation scheme, but its getting there.
22
23 And we do have a tool that will convert /most/ CPAN versions into
24 portage versions, which works as long as upstream are sane:
25
26 dev-perl/Gentoo-PerlMod-Version
27
28 Which relies on another perl module 'version.pm' (
29 virtual/perl-version ) which handles most the real dirty work of
30 normalising things, and we just do a bit of post-processing of that to
31 make it nicer for us ( mostly stripping leading 0's in digit groups,
32 and mapping the upstream 'developer release' hints ( ie: -TRIAL or
33 _01 components ) to the _rc suffix.
34
35 If you wanted to you could call that script, or delve into the guts of
36 it and version.pm and try understand how it works, but you could be
37 there a while.
38
39 But we're unfortunately going to *always* need a way to correct
40 versions, because upstream occasionally produce bogus nonsense
41 versions that don't even make sense. ( ie: making versions go
42 backwards and expect it to work, but it does, because the cpan indexer
43 takes whatever was most recently uploaded ... or something like that.
44 )
45
46
47 --
48 Kent
49
50 perl -e  "print substr( \"edrgmaM  SPA NOcomil.ic\\@tfrken\", \$_ * 3,
51 3 ) for ( 9,8,0,7,1,6,5,4,3,2 );"
52
53 http://kent-fredric.fox.geek.nz