From: Jos I. Boumans Date: Tue, 8 May 2007 14:05:34 +0000 (+0200) Subject: Update CPANPLUS to 0.79_02 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e3b7d412e225646739735ee08e98041e0278f7bf;p=p5sagit%2Fp5-mst-13.2.git Update CPANPLUS to 0.79_02 From: "Jos I. Boumans" Message-Id: p4raw-id: //depot/perl@31168 --- diff --git a/lib/CPANPLUS.pm b/lib/CPANPLUS.pm index 16650a7..de12be6 100644 --- a/lib/CPANPLUS.pm +++ b/lib/CPANPLUS.pm @@ -13,7 +13,7 @@ BEGIN { use vars qw( @EXPORT @ISA $VERSION ); @EXPORT = qw( shell fetch get install ); @ISA = qw( Exporter ); - $VERSION = "0.79_01"; #have to hardcode or cpan.org gets unhappy + $VERSION = "0.79_02"; #have to hardcode or cpan.org gets unhappy } ### purely for backward compatibility, so we can call it from the commandline: diff --git a/lib/CPANPLUS/Config.pm b/lib/CPANPLUS/Config.pm index 90cc6d3..501aa03 100644 --- a/lib/CPANPLUS/Config.pm +++ b/lib/CPANPLUS/Config.pm @@ -191,12 +191,10 @@ my $Conf = { "Could not find the '%1' in your path". "--this may be a problem.\n". "Please locate this program and set ". - "your '%1' config entry to its path.\n". - "Attempting to provide a reasonable ". - "fallback...", + "your '%2' config entry to its path.\n", $name, 'perlwrapper' )); - return '-P' + return ''; }->(), }, diff --git a/lib/CPANPLUS/Dist/Base.pm b/lib/CPANPLUS/Dist/Base.pm index 2ba0abb..630bf53 100644 --- a/lib/CPANPLUS/Dist/Base.pm +++ b/lib/CPANPLUS/Dist/Base.pm @@ -165,15 +165,16 @@ sub create { $dist = $self->status->dist if $self->status->dist; $self->status->dist( $dist ) unless $self->status->dist; - my $cb = $self->parent; - my $conf = $cb->configure_object; + my $cb = $self->parent; + my $conf = $cb->configure_object; + my $format = ref $dist; ### make sure to set this variable, if the caller hasn't yet ### just so we have some clue where the dist left off. $dist->status->dist( $dist_cpan->status->distdir ) unless defined $dist->status->dist; - $dist->status->created( $dist_cpan->create( @_ ) ); + $dist->status->created( $dist_cpan->create(prereq_format => $format, @_) ); } =head2 $bool = $dist->install diff --git a/lib/CPANPLUS/Dist/MM.pm b/lib/CPANPLUS/Dist/MM.pm index 86c04dc..14efb88 100644 --- a/lib/CPANPLUS/Dist/MM.pm +++ b/lib/CPANPLUS/Dist/MM.pm @@ -142,7 +142,7 @@ sub format_available { return; } - for my $pgm ( qw[make perlwrapper] ) { + for my $pgm ( qw[make] ) { unless( $conf->get_program( $pgm ) ) { error(loc( "You do not have '%1' in your path -- '%2' not available\n" . @@ -376,7 +376,7 @@ sub prepare { ### start resolving prereqs ### my $prereqs = $self->status->prereqs; - + ### a hashref of prereqs on success, undef on failure ### $prereqs ||= $dist->_find_prereqs( verbose => $verbose, diff --git a/lib/CPANPLUS/Selfupdate.pm b/lib/CPANPLUS/Selfupdate.pm index 339d982..f02c1f1 100644 --- a/lib/CPANPLUS/Selfupdate.pm +++ b/lib/CPANPLUS/Selfupdate.pm @@ -134,11 +134,16 @@ CPANPLUS::Selfupdate signature => [ sub { my $cb = shift; - return if can_run('gpg') and - $cb->configure_object->get_conf('prefer_bin'); + return if can_run('gpg'); + ### leave this out -- Crypt::OpenPGP is fairly + ### painful to install, and broken on some platforms + ### so we'll just always fall back to gpg. It may + ### issue a warning or 2, but that's about it. + ### this change due to this ticket: #26914 + # and $cb->configure_object->get_conf('prefer_bin'); return { 'Crypt::OpenPGP' => '0.0' }; }, - sub { + sub { my $cb = shift; return $cb->configure_object->get_conf('signature'); }, @@ -218,7 +223,7 @@ sub selfupdate { latest => { default => 0, store => \$latest, allow => BOOLEANS }, force => { default => $conf->get_conf('force'), store => \$force }, }; - + check( $tmpl, \%hash ) or return; my $ref = $cache->{$type}; @@ -229,7 +234,7 @@ sub selfupdate { ### do we need the latest versions? @mods = $latest ? @mods - : grep { $_->is_installed_version_sufficient } @mods; + : grep { !$_->is_installed_version_sufficient } @mods; my $flag; for my $mod ( @mods ) { diff --git a/lib/CPANPLUS/Shell/Default.pm b/lib/CPANPLUS/Shell/Default.pm index c153e73..3d16c10 100644 --- a/lib/CPANPLUS/Shell/Default.pm +++ b/lib/CPANPLUS/Shell/Default.pm @@ -26,7 +26,7 @@ local $Data::Dumper::Indent = 1; # for dumpering from ! BEGIN { use vars qw[ $VERSION @ISA ]; @ISA = qw[ CPANPLUS::Shell::_Base::ReadLine ]; - $VERSION = "0.79_01"; + $VERSION = "0.79_02"; } load CPANPLUS::Shell; @@ -1152,7 +1152,10 @@ sub _set_conf { unless( $valid{$key} ) { print loc( "To update your current CPANPLUS installation, ". "choose one of the these options:\n%1", - (join $/, map {"\ts selfupdate $_"} sort keys %valid) ); + ( join $/, map { + sprintf "\ts selfupdate %-17s [--latest=0]", $_ + } sort keys %valid ) + ); } else { print loc( "Updating your CPANPLUS installation\n" ); $cb->selfupdate_object->selfupdate( diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed index b6eb10c..43fb7c7 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed -Created at Sun Apr 22 10:12:09 2007 +Created at Tue May 8 13:53:41 2007 ######################################################################### __UU__ M'XL("%_EO$4``S`Q;6%I;')C+G1X=`!+S,E,+%9P#8T(5@`#)=>*DM"2S)QB diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed index 2f3061a..bbfd7fc 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed -Created at Sun Apr 22 10:12:09 2007 +Created at Tue May 8 13:53:41 2007 ######################################################################### __UU__ M'XL("!1%OT4"`T)U;F1L92U&;V\M0F%R+3`N,#$N=&%R`.V7:V_:,!2&^8I_ diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed index b777538..3a72b4c 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed -Created at Sun Apr 22 10:12:09 2007 +Created at Tue May 8 13:53:41 2007 ######################################################################### __UU__ M'XL("/8X34("`T9O;RU"87(M,"XP,2YT87(`[9KQ;]I&%,?Y^?Z*1YE$(A5C diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed index e5e7121..71fab0e 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed -Created at Sun Apr 22 10:12:09 2007 +Created at Tue May 8 13:53:41 2007 ######################################################################### __UU__ M'XL(`'3DO44``^W/,0J`,`Q`T1RE)Y"T-O4XXN"DB%2]OR(*NNC4[;_E#\F0 diff --git a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed index bae77dc..992c504 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed -Created at Sun Apr 22 10:12:09 2007 +Created at Tue May 8 13:53:41 2007 ######################################################################### __UU__ M'XL("`DY34("`T9O;RU"87(M,"XP,2YT87(`[5IK3]M(%,U7YE='0`E=-1:]LP$`#@=_^* diff --git a/lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed b/lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed index 905849e..6706221 100644 --- a/lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed +++ b/lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed @@ -10,7 +10,7 @@ To recreate it use the following command: uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed -Created at Sun Apr 22 10:12:09 2007 +Created at Tue May 8 13:53:41 2007 ######################################################################### __UU__ M'XL("#'FO$4``S`S;6]D;&ES="YD871A`%U3_6O;,!#].?HKCBXC"20A=<@& diff --git a/lib/CPANPLUS/t/inc/conf.pl b/lib/CPANPLUS/t/inc/conf.pl index 0694a79..50c8970 100644 --- a/lib/CPANPLUS/t/inc/conf.pl +++ b/lib/CPANPLUS/t/inc/conf.pl @@ -120,7 +120,7 @@ sub gimme_conf { # TEST_INSTALL_DIR_BIN, # TEST_INSTALL_DIR_MAN1, # TEST_INSTALL_DIR_MAN3, - ], ( $ENV{PERL_CORE} ? 0 : 1 ) ); + ], 1 ); return $conf; }; @@ -154,7 +154,7 @@ END { # TEST_INSTALL_DIR_BIN, # TEST_INSTALL_DIR_MAN1, # TEST_INSTALL_DIR_MAN3, - ], 0 ); # DO NOT be verbose under perl core -- makes tests fail + ], 1 ); } } @@ -168,9 +168,6 @@ sub _clean_test_dir { for my $dir ( @$dirs ) { - ### no point if it doesn't exist; - next unless -d $dir; - my $dh; opendir $dh, $dir or die "Could not open basedir '$dir': $!"; while( my $file = readdir $dh ) { @@ -180,7 +177,7 @@ sub _clean_test_dir { ### directory, rmtree it if( -d $path ) { - print "# Deleting directory '$path'\n" if $verbose; + print "Deleting directory '$path'\n" if $verbose; eval { rmtree( $path ) }; warn "Could not delete '$path' while cleaning up '$dir'" if $@;