[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The difficulty or ease of packaging Perl/Python/Ruby/PHP applications



On Jan 23, 2008 5:18 PM, Martín Ferrari <martin.ferrari@gmail.com> wrote:

> Today, we're using /modules/02packages.details.txt.gz to get a list of
> distributions with their current versions. That doesn't include
> experimental releases, of course.

Today I found a problem with this approach, ironically concerning a
package written by Gabor:

$ zgrep 'Text-Format[^a-zA-Z-]' 02packages.details.txt.gz
Text::Format                       0.52  G/GA/GABOR/Text-Format0.52.tar.gz
Text::NWrap                        0.11
G/GA/GABOR/Text-Format0.52+NWrap0.11.tar.gz

As I cannot know which module name to look for, I parse the filenames
with CPAN::DistnameInfo to extract dist name and version. And the
above two files map to the same distribution, so I have to decide
which one is newer, and the wrong one gets selected. I don't know how
CPAN sorts versions (if it does at all, I suspect that latest version
is date-sorted and not version-sorted), so I use debian sorting, and
0.52+foo is bigger than 0.52.



-- 
Martín Ferrari


Reply to: