+2010-01-14 Andreas J. Koenig <andk@cpan.org>
+
+ * release 1.94_54
+
+ * David Golden fixes several recent regressions related to external
+ transport tools (ncftp, lynx, curl, etc)
+
+ * fixed quoting for downloading into directories containing
+ whitespace (reported by Jarkko Hietaniemi)
+
+ * amended lib/App/Cpan.pm because of a regression reported by Zefram as
+ rt.cpan.org #53305 and rt.perl.org #71838
+
2009-12-18 Andreas J. Koenig <andk@cpan.org>
* release 1.94_53
Archive::Tar
Archive::Zip
CPAN::Checksums
+ Compress::Bzip2
Compress::Zlib
Data::Dumper
Digest::SHA
git tag -m 'This is $(VERSION)' "$(VERSION)"
ls -l $(DISTVNAME).tar$(SUFFIX)
rm -rf $(DISTVNAME)
- $(NOECHO) $(ECHO) '% lftp pause.perl.org'
- $(NOECHO) $(ECHO) '> cd incoming'
- $(NOECHO) $(ECHO) '> put $(DISTVNAME).tar$(SUFFIX)'
- $(NOECHO) $(ECHO) '> quit'
- $(NOECHO) $(ECHO) '% git push --tags master'
+ $(NOECHO) $(ECHO) ' lftp pause.perl.org'
+ $(NOECHO) $(ECHO) ' cd incoming'
+ $(NOECHO) $(ECHO) ' put $(DISTVNAME).tar$(SUFFIX)'
+ $(NOECHO) $(ECHO) ' quit'
+ $(NOECHO) $(ECHO) ' git push --tags'
snapshot : Makefile no_CR META.yml README testdistros all tardist
t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Expect-1.00.tar.gz \
t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Failearly-1.02.tar.gz \
t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Features-1.06.tar.gz \
+ t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-TimeSkew-1.00.tar.gz \
t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-UnsatPrereq-1.00.tar.gz \
t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Zip-1.03.zip \
t/CPAN/authors/id/A/AN/ANDK/NotInChecksums-0.000.tar.gz
# testdistros
#
+# TimeSkey has Makefile.PL missing here because it gets the timestamp
+# of the Makefile.PL set to the future which confuses make
+t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-TimeSkew-1.00.tar.gz: \
+ t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-TimeSkew/Changes \
+ t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-TimeSkew/MANIFEST \
+ t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-TimeSkew/README \
+ t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-TimeSkew/lib/CPAN/Test/Dummy/Perl5/Make/TimeSkew.pm \
+ t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-TimeSkew/t/00_load.t
+ -cd t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-TimeSkew && \
+ $(PERL) -e 'utime((time-12)x2), "Makefile.PL"' && \
+ $(PERL) Makefile.PL && \
+ $(MAKE) dist && \
+ mv CPAN-Test-Dummy-Perl5-Make-TimeSkew-1.00.tar.gz .. && \
+ $(MAKE) tamper-timestamps-now
+ -$(MAKE) clean
+ ls -l $@
+
+
t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Build-1.03.tar.gz: \
t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Build/Changes \
t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Build/MANIFEST \
use warnings;
use vars qw($VERSION);
-$VERSION = '1.570001'; # 1.57 + local patches for bleadperl
+$VERSION = '1.5701';
=head1 NAME
{
# this is what CPAN.pm would do otherwise
CPAN::HandleConfig->load(
- be_silent => 1,
+ # be_silent => 1, # candidate to be ripped out forever
write_file => 0,
);
}
=for comment
-CPAN.pm sends all the good stuff either to STDOUT, or to a temp
-file if $CPAN::Be_Silent is set. I have to intercept that output
-so I can find out what happened.
+CPAN.pm sends all the good stuff either to STDOUT. I have to intercept
+that output so I can find out what happened.
=cut
# vim: ts=4 sts=4 sw=4:
use strict;
package CPAN;
-$CPAN::VERSION = '1.94_5301'; # 1.94_53 + local patches for bleadperl
+$CPAN::VERSION = '1.94_54';
$CPAN::VERSION =~ s/_//;
# we need to run chdir all over and we would get at wrong libraries
=head1 PREREQUISITES
+The CPAN program is trying to depend on as little as possible so the
+user can use it in hostile enviroment. It works better the more goodies
+the environment provides. For example if you try in the CPAN shell
+
+ install Bundle::CPAN
+
+or
+
+ install Bundle::CPANxxl
+
+you will find the shell more convenient than the bare shell before.
+
If you have a local mirror of CPAN and can access all files with
"file:" URLs, then you only need a perl later than perl5.003 to run
this module. Otherwise Net::FTP is strongly recommended. LWP may be
=head1 TRANSLATIONS
-Kawai,Takanori provides a Japanese translation of this manpage at
+Kawai,Takanori provides a Japanese translation of a very old version
+of this manpage at
L<http://homepage3.nifty.com/hippo2000/perltips/CPAN.htm>
=head1 SEE ALSO
-L<cpan>, L<CPAN::Nox>, L<CPAN::Version>
+Many people enter the CPAN shell by running the L<cpan> utility
+program which is installed in the same directory as perl itself. So if
+you have this directory in your PATH variable (or some equivalent in
+your operating system) then typing C<cpan> in a console window will
+work for you as well. Above that the utility provides several
+commandline shortcuts.
=cut
$patch = $f if -f $f;
}
unless (-f $patch) {
+ CPAN->debug("not on disk: patch[$patch]") if $CPAN::DEBUG;
if (my $trydl = $self->try_download($patch)) {
$patch = $trydl;
} else {
next DLPRG unless defined $funkyftp;
next DLPRG if $funkyftp =~ /^\s*$/;
- my($asl_ungz, $asl_gz);
- ($asl_ungz = $aslocal) =~ s/\.gz//;
- $asl_gz = "$asl_ungz.gz";
-
my($src_switch) = "";
my($chdir) = "";
- my($stdout_redir) = " > $asl_ungz";
+ my($stdout_redir) = " > \"$aslocal\"";
if ($f eq "lynx") {
$src_switch = " -source";
} elsif ($f eq "ncftp") {
+ next DLPRG unless $url =~ m{\Aftp://};
$src_switch = " -c";
} elsif ($f eq "wget") {
- $src_switch = " -O $asl_ungz";
+ $src_switch = " -O \"$aslocal\"";
$stdout_redir = "";
} elsif ($f eq 'curl') {
$src_switch = ' -L -f -s -S --netrc-optional';
if ($proxy_vars->{http_proxy}) {
$src_switch .= qq{ -U "$proxy_vars->{proxy_user}:$proxy_vars->{proxy_pass}" -x "$proxy_vars->{http_proxy}"};
}
- }
-
- if ($f eq "ncftpget") {
+ } elsif ($f eq "ncftpget") {
+ next DLPRG unless $url =~ m{\Aftp://};
$chdir = "cd $aslocal_dir && ";
$stdout_redir = "";
}
$CPAN::Frontend->myprint(
qq[
-Trying with "$funkyftp$src_switch" to get
- "$url"
+Trying with
+ $funkyftp$src_switch
+to get
+ $url
]);
my($system) =
"$chdir$funkyftp$src_switch \"$url\" $devnull$stdout_redir";
my($wstatus) = system($system);
if ($f eq "lynx") {
# lynx returns 0 when it fails somewhere
- if (-s $asl_ungz) {
+ if (-s $aslocal) {
my $content = do { local *FH;
- open FH, $asl_ungz or die;
+ open FH, $aslocal or die;
local $/;
<FH> };
if ($content =~ /^<.*(<title>[45]|Error [45])/si) {
if (-s $aslocal) {
# Looks good
$some_dl_success++;
- } elsif ($asl_ungz ne $aslocal) {
- # test gzip integrity
- if (eval{CPAN::Tarzip->new($asl_ungz)->gtest}) {
- # e.g. foo.tar is gzipped --> foo.tar.gz
- rename $asl_ungz, $aslocal;
- $some_dl_success++;
- } else {
- eval{CPAN::Tarzip->new($asl_gz)->gzip($asl_ungz)};
- if ($@) {
- warn "Warning: $@";
- } else {
- $some_dl_success++;
- }
- }
}
$ThesiteURL = $ro_url;
return $aslocal;
- } elsif ($url !~ /\.gz(?!\n)\Z/) {
- unlink $asl_ungz if
- -f $asl_ungz && -s _ == 0;
- my $gz = "$aslocal.gz";
- my $gzurl = "$url.gz";
- $CPAN::Frontend->myprint(
- qq[
- Trying with "$funkyftp$src_switch" to get
- "$url.gz"
- ]);
- my($system) = "$funkyftp$src_switch \"$url.gz\" $devnull > $asl_gz";
- $self->debug("system[$system]") if $CPAN::DEBUG;
- my($wstatus);
- if (($wstatus = system($system)) == 0
- &&
- -s $asl_gz
- ) {
- # test gzip integrity
- my $ct = eval{CPAN::Tarzip->new($asl_gz)};
- if ($ct && $ct->gtest) {
- $ct->gunzip($aslocal);
- } else {
- # somebody uncompressed file for us?
- rename $asl_ungz, $aslocal;
- }
- $ThesiteURL = $ro_url;
- return $aslocal;
- } else {
- unlink $asl_gz if -f $asl_gz;
- }
} else {
my $estatus = $wstatus >> 8;
my $size = -f $aslocal ?
"cd /",
map("cd $_", split /\//, $dir), # RFC 1738
"bin",
+ "passive",
"get $getfile $targetfile",
"quit"
);
use File::Spec ();
use CPAN::Mirrors ();
use vars qw($VERSION $silent);
-$VERSION = "5.530001"; # 5.53 + local patches for bleadperl
+$VERSION = "5.53";
=head1 NAME
package CPAN::Mirrors;
use strict;
use vars qw($VERSION $urllist $silent);
-$VERSION = "1.770001"; # 1.77 + local patches for bleadperl
+$VERSION = "1.77";
use Carp;
use FileHandle;
#-> sub CPAN::Shell::m ;
sub m { # emacs confused here }; sub mimimimimi { # emacs in sync here
my $self = shift;
- $CPAN::Frontend->myprint($self->format_result('Module',@_));
+ my @m = @_;
+ for (@m) {
+ if (m|(?:\w+/)*\w+\.pm$|) { # same regexp in expandany
+ s/.pm$//;
+ s|/|::|g;
+ }
+ }
+ $CPAN::Frontend->myprint($self->format_result('Module',@m));
}
#-> sub CPAN::Shell::i ;
my($self,$s) = @_;
CPAN->debug("s[$s]") if $CPAN::DEBUG;
my $module_as_path = "";
- if ($s =~ m|(?:\w+/)*\w+\.pm$|) {
+ if ($s =~ m|(?:\w+/)*\w+\.pm$|) { # same regexp in sub m
$module_as_path = $s;
$module_as_path =~ s/.pm$//;
$module_as_path =~ s|/|::|g;