Subject: | CPAN.pm doesn't recognise 404s from CURL |
Date: | Mon, 30 Jan 2006 12:15:38 +0000 |
To: | bug-cpan [...] rt.cpan.org |
From: | Nicholas Clark <nick [...] ccl4.org> |
CPAN.pm doesn't recognise when curl fails to find a file. Transcript of my
CPAN session is:
$ /home/nick/Sandpit/snap5.9.x-26999/bin/perl5.9.3 -MCPAN -eshell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v1.8359)
ReadLine support available (try 'install Bundle::CPAN')
Show quoted text
cpan> install YAML
CPAN: Storable loaded ok
Going to read /home/nick/.cpan/Metadata
Database was generated on Mon, 30 Jan 2006 09:12:08 GMT
Running install for module YAML
Running make for I/IN/INGY/YAML-0.55.tar.gz
LWP not available
LWP not available
CPAN: Net::FTP loaded ok
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/authors/id/I/IN/INGY/YAML-0.55.tar.gz
Couldn't fetch YAML-0.55.tar.gz from ftp.perl.org: YAML-0.55.tar.gz: No such file or directory
Trying with "/usr/local/bin/curl -L" to get
http://www.perl.org/CPAN/authors/id/I/IN/INGY/YAML-0.55.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
200 195 200 231 0 0 461 0 --:--:-- --:--:-- --:--:-- 0
CPAN: Compress::Zlib loaded ok
CPAN: Digest::SHA loaded ok
CPAN: Module::Signature security checks disabled because Module::Signature
not installed. Please consider installing the Module::Signature module.
You may also need to be able to connect over the Internet to the public
keyservers like pgp.mit.edu (port 11371).
Trying with "/usr/local/bin/curl -L" to get
http://www.perl.org/CPAN/authors/id/I/IN/INGY/CHECKSUMS
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 153k 100 153k 0 0 130k 0 0:00:01 0:00:01 --:--:-- 272k
Warning: No checksum for YAML-0.55.tar.gz in /home/nick/.cpan/sources/authors/id/I/IN/INGY/CHECKSUMS.
The cause for this may be that the file is very new and the checksum
has not yet been calculated, but it may also be that something is
going awry right now.
Proceed? [yes] yes
Scanning cache /home/nick/.cpan/build for sizes
tar: Unrecognized archive format: Inappropriate file type or format
Uncompressed /home/nick/.cpan/sources/authors/id/I/IN/INGY/YAML-0.55.tar.gz successfully
Using Tar:/usr/bin/tar xvf "YAML-0.55.tar":
tar: Unrecognized archive format: Inappropriate file type or format
Couldn't untar YAML-0.55.tar
Show quoted textcpan> quit
Terminal does not support GetHistory.
Lockfile removed.
What's happening is:
$ /usr/local/bin/curl -L http://www.perl.org/CPAN/authors/id/I/IN/INGY/Test-Base-0.48.tar.gz
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /authors/id/I/IN/INGY/Test-Base-0.48.tar.gz was not found on this server.<P>
</BODY></HTML>
$ zcat /home/nick/.cpan/sources/authors/id/I/IN/INGY/YAML-0.55.tar.gz
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /authors/id/I/IN/INGY/YAML-0.55.tar.gz was not found on this server.<P>
</BODY></HTML>
So somehow the curl 404 output is getting compressed and written to
~/.cpan/sources/authors/id/I/IN/INGY/YAML-0.55.tar.gz
and assumed to be a successfully downloaded tarball.
This is CPAN.pm 1.83_59, in bleadperl. (Freshly installed at patchlevel 26999;
I answered "no" to "are you ready for manual configuration?")
Nicholas Clark