Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Mini CPAN distribution.

Report information
The Basics
Id: 7727
Status: resolved
Worked: 30 min
Priority: 0/
Queue: CPAN-Mini

People
Owner: rjbs [...] cpan.org
Requestors: mbarbon [...] users.sourceforge.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.16
Fixed in: (no value)



Subject: Mirroring broken on Win32
Hi, I really, really like CPAN::Mini! But of course I have a problem :-) Symptom: minicpan correctly downloads the files, then deletes them all. Reason: the hash $self->{mirrored} contains the paths with backslashes, while File::Find always returns paths with forward slashes hence the test at line 197 always fails. The solution is straightforward (a call to canonpath). Currently C::M downloads more than one version of the same distribution (for example I get Wx-0.11, 12, 13, 15 and 20, and several versions of bioperl). Would a patch to (optionally?) download only the latest version of each distribution listed in the module list be accepted? Thanks! Mattia
--- lib\CPAN\Mini.pm Wed Sep 08 03:46:27 2004 +++ c:\programs\devel\perl\activeperl-5.8.4\site\lib\CPAN\Mini.pm Fri Sep 17 10:36:01 2004 @@ -52,5 +52,5 @@ use File::Path qw(mkpath); use File::Basename qw(dirname); -use File::Spec::Functions qw(catfile); +use File::Spec::Functions qw(catfile canonpath); use File::Find qw(find); @@ -195,5 +195,5 @@ find sub { - return unless -f and not $self->{mirrored}{$File::Find::name}; + return unless -f and not $self->{mirrored}{canonpath($File::Find::name)}; $self->trace("$File::Find::name ... removed\n"); unlink $_ or warn "Cannot remove $File::Find::name: $!";
[MBARBON - Tue Sep 21 12:14:08 2004]: Show quoted text
> Symptom: minicpan correctly downloads the files, then > deletes them all. Reason: the hash $self->{mirrored} contains > the paths with backslashes, while File::Find always returns paths > with forward slashes hence the test at line 197 always fails. > The solution is straightforward (a call to canonpath).
This problem has been reported, but I'm glad to have it in RT now. I will fix this as soon as I sit down at my Win32 machine and poke at it -- hopefully tonight! Show quoted text
> Currently C::M downloads more than one version of the same distribution > (for example I get Wx-0.11, 12, 13, 15 and 20, and several versions of > bioperl). Would a patch to (optionally?) download only the latest > version of each distribution listed in the module list be accepted?
It only downloads versions in 02packages. The CPAN indexer sometimes leaves more than one version in there, which is really weird. I'm looking at the PAUSE code to fix this, but in the meantime, I am not planning to change minicpan to fix this problem -- it would have to use something like Parse::CPAN or Sort::Version, which would just add to the prereqs. The impact should be small, I think? (Ack, actually, several bioperls? Ugh.) I'll have a look, at least.
CPAN::Mini 0.18 fixes this problem by wrapping File::Find::name in canonpath(). I've verified on my own Win32 box that the problem existed and is now gone!