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
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"