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

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



Hi Andreas,

On Feb 4, 2008 7:24 PM, Andreas J. Koenig
<andreas.koenig.7os6VVqR@franz.ak.mind.de> wrote:

>   > As I cannot know which module name to look for, I parse the filenames
>   > with CPAN::DistnameInfo to extract dist name and version.
>
> This is wrong. The filename can contain anything. The middle column
> tells you which version of a package is in the tarball.

The problem is that in Debian we track CPAN distributions and not
packages (i.e individual .pm's). And the number in the middle I
understand is the version of the package. If not, i'd happily use it.
Also, the manpage from DistnameInfo seems to imply that the number in
the filename is in fact the version of the distribution.

>   > 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.
>
> Of course, both are wrong because they are in conflict. We usually do
> not allow two packages to contain the same file. But it is not
> enforced, it is common practice.

It seems that search.cpan.org is as confused as us, since it lists
Text-Format0.52+NWrap0.11 as an older version of Text-Format
(http://search.cpan.org/dist/Text-Format/). I thought they were in
fact the same dist, with a strange version number.

> There are four different sorting algorithms: version.pm,
> CPAN::Version, Sort::Version, Perl::Version. The first one is
> designated to be the standard sorting method. Not every place has yet
> adopted this standard because it is new in 5.10 and it needs a lot of
> time and energy to determine the conflicts arising from a switch. The
> second is currently used in CPAN.pm. The other two are folklore with
> their own merits. In the CPAN.pm distribution you find test cases in
> t/10version.t that demonstrate their subtle differences.

Thank you very much, this is very valuable insight. I'll start using
CPAN::Version from now on (if it's the case that CPAN uses CPAN.pm
code :)). Although I should not need to sort from 02packages*.gz, I
need to do that when scanning ls-lR.gz.

> Your advantage is that you usually do not need do the sorting yourself
> because the middle column of 02packages.details.txt.gz is what you can
> take for granted. Erm, except where you can't.

heh :)

> Whenever you can't it's time to write a bugreport to rt.cpan.org. When
> people upload 1.10 after 1.9 they get an automated email from the
> indexer that they have a decreasing version number. But many ignore
> these mails and so users need to file bug reports, boycott the new
> files, patch them downstream, whatever.

Ok. I didn't raise any bug because I was doing guesswork and wasn't
sure about many things.

Thanks again.

-- 
Martín Ferrari


Reply to: