Update CPANPLUS to 0.79_02
authorJos I. Boumans <kane@dwim.org>
Tue, 8 May 2007 14:05:34 +0000 (16:05 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 8 May 2007 12:38:04 +0000 (12:38 +0000)
From: "Jos I. Boumans" <kane@dwim.org>
Message-Id: <D216B250-B8FA-488E-839B-27A187BAF04C@dwim.org>

p4raw-id: //depot/perl@31168

16 files changed:
lib/CPANPLUS.pm
lib/CPANPLUS/Config.pm
lib/CPANPLUS/Dist/Base.pm
lib/CPANPLUS/Dist/MM.pm
lib/CPANPLUS/Selfupdate.pm
lib/CPANPLUS/Shell/Default.pm
lib/CPANPLUS/t/dummy-CPAN/authors/01mailrc.txt.gz.packed
lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Bundle-Foo-Bar-0.01.tar.gz.packed
lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/Foo-Bar-0.01.tar.gz.packed
lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUNOXS/perl5.005_03.tar.gz.packed
lib/CPANPLUS/t/dummy-CPAN/authors/id/E/EU/EUXS/Foo-Bar-0.01.tar.gz.packed
lib/CPANPLUS/t/dummy-CPAN/authors/id/M/MB/MBNOXS/Foo-Bar-0.01.tar.gz.packed
lib/CPANPLUS/t/dummy-CPAN/authors/id/M/MB/MBXS/Foo-Bar-0.01.tar.gz.packed
lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz.packed
lib/CPANPLUS/t/dummy-CPAN/modules/03modlist.data.gz.packed
lib/CPANPLUS/t/inc/conf.pl

index 16650a7..de12be6 100644 (file)
@@ -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:
index 90cc6d3..501aa03 100644 (file)
@@ -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 '';
         }->(),         
     },
 
index 2ba0abb..630bf53 100644 (file)
@@ -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
index 86c04dc..14efb88 100644 (file)
@@ -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,
index 339d982..f02c1f1 100644 (file)
@@ -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 ) {
index c153e73..3d16c10 100644 (file)
@@ -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( 
index b6eb10c..43fb7c7 100644 (file)
@@ -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
index 2f3061a..bbfd7fc 100644 (file)
@@ -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_
index b777538..3a72b4c 100644 (file)
@@ -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
index e5e7121..71fab0e 100644 (file)
@@ -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
index bae77dc..992c504 100644 (file)
@@ -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=<H%5``A.;
index c817479..baf9905 100644 (file)
@@ -10,7 +10,7 @@ To recreate it use the following command:
 
      uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/M/MB/MBNOXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/M/MB/MBNOXS/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("-<X34(``T9O;RU"87(M,"XP,2YT87(`[9E;;]HP%,=Y]J<X+9722@-R
index ac7ead2..8d76716 100644 (file)
@@ -10,7 +10,7 @@ To recreate it use the following command:
 
      uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/authors/id/M/MB/MBXS/Foo-Bar-0.01.tar.gz lib/CPANPLUS/t/dummy-CPAN/authors/id/M/MB/MBXS/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("-\X34(``T9O;RU"87(M,"XP,2YT87(`[5K_3QI)%/=7YZ]XU39H(BN[
index 6a3f84a..ad14811 100644 (file)
@@ -10,7 +10,7 @@ To recreate it use the following command:
 
      uupacktool.pl -p lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz lib/CPANPLUS/t/dummy-CPAN/modules/02packages.details.txt.gz.packed
 
-Created at Sun Apr 22 10:12:09 2007
+Created at Tue May  8 13:53:41 2007
 #########################################################################
 __UU__
 M'XL("-%#OT4``S`R<&%C:V%G97,N9&5T86EL<RYT>'0`E=-1:]LP$`#@=_^*
index 905849e..6706221 100644 (file)
@@ -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=<@&
index 0694a79..50c8970 100644 (file)
@@ -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 $@;