Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242352 - g-cpan generates some ebuilds with versions that make updating look like downgrading
Summary: g-cpan generates some ebuilds with versions that make updating look like down...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-16 16:20 UTC by Joshua Roys
Modified: 2010-02-12 20:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Roys 2008-10-16 16:20:05 UTC
g-cpan generates some perl ebuilds using version strings that don't work well with portage.  I see that in dev-perl/ that is avoided by either prefixing '0's or by splitting up the version number with '.'s

For example, dev-perl/DateTime:  In CPAN it is 0.4305.  portage has the following ebuild versions:  0.39, 0.43.04, 0.43.05.  If the '.'s were not there, we would have 0.39, 0.4304, and 0.4305.  Suppose an update came out with version 0.44 ... 0.44 would never be larger than 0.4305 (which is a larger number, 44 or 4305?).

This has occurred using g-cpan with (so far) 2 modules for me:  Coro and EV.

# epm -qG Coro EV
perl-gcpan/Coro-4.745
perl-gcpan/EV-3.431
# emerge -1va =Coro-4.8 =EV-3.44 

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD] perl-gcpan/Coro-4.8 [4.745] 0 kB [1]
[ebuild     UD] perl-gcpan/EV-3.44 [3.431] 0 kB [1]

Total: 2 packages (2 downgrades), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage

Would you like to merge these packages? [Yes/No]

Long story short, emerge -Duav never sees these updates.

Reproducible: Sometimes

Steps to Reproduce:
1. find a package with a version string with more than 2 digits (e.g. 0.4305)
2. wait for an update to said package with less than the previously found number of digits (e.g. 0.441 or 0.44 or 0.5, whichever)
3. note that this doesn't work - they are not treated as updates but downgrades, and have to be found manually
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-02-12 20:29:30 UTC
The root problem is that there is no common versioning practice on CPAN.

Some developers do a positional ascii sort:
0.43 -> 0.4305 -> 0.44

Other developers do a simple integer sort on each component of the $PV, like Portage:
0.800 -> 0.989 -> 0.1001 -> 0.2002

the developer of Image::Size even switched BETWEEN the two styles :-(.

So really, there are some ebuilds that have to have some version mangling done, shifting decimal separators around.

This IS discussion in the Perl herd documentation:
http://www.gentoo.org/proj/en/perl/perl-herd.xml
under "Version numbers in Gentoo perl ebuilds"