Update CPANPLUS to CPAN version 0.9005
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Fri, 2 Jul 2010 14:05:53 +0000 (15:05 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Fri, 2 Jul 2010 14:05:53 +0000 (15:05 +0100)
  [DELTA]

  Changes for 0.9005      Tue Jun 29 22:42:25 2010
  ================================================
  * Corrected spelling mistakes in POD, pointed out by H.Merijn Brand
  * Amend SQLite source engine to set SYNCHRONOUS pragma to OFF
  * Make sure that Selfupdate checks if CPANPLUS::Dist::Build is
    installed or not and update it if it is. Spotted by Ilmari
  * Apply a patch from Peter Ludikovsky RT #55782 that adds indexes
    to Source::SQLite

  Changes for 0.9004      Sat May  8 22:21:04 2010
  ================================================
  * Applied a patch from Schwern RT #53133 "test failure occurs if
    the build directory is symlinked"
  * Explicitly set the location of cpanp-run-perl when under PERL_CORE
    in t/inc/conf.pl
  * Make sure that we find cpanp-run-perl in ../../utils when PERL_CORE
  * Apply a patch from Barbie [RT #56768], that fixes regex in
    RELEVANT_TEST_RESULT
  * Fixed a typo in the POD for cpan2dist, pointed out by Babar
    (Olivier Raginel) on irc.
  * Add a BEGIN {} block to cpanp-run-perl this resolves RT #55964
    and RT #57106

  Changes for 0.9003      Mon Mar 15 13:51:12 2010
  ================================================
  * Resolve warnings when using blead perl, reported by Apocalypse RT #55501
  * Applied patch from Apocalypse RT #55541 that changes the
    behviour when a prereq on a core-only module is detected. We
    raise a warning now, but will proceed with the installation.
    This is how CPAN.pm handles it.
  * Removed one duff mirror and an out-of-date mirror from
    our default mirror list. Replaced with fast-sync mirrors.

  Changes for 0.9002      Fri Mar 12 13:11:00 2010
  ================================================
  * Added support for CPAN Testers 2.0 (David Golden)

  Changes for 0.9001      Thu Dec 24 10:21:11 2009
  ================================================
  * RT #52988 Regression in Internals::Utils, reported by CRAKRJACK
  * Fix a regression with dist_type not being propagated

17 files changed:
Porting/Maintainers.pl
cpan/CPANPLUS/bin/cpan2dist
cpan/CPANPLUS/lib/CPANPLUS.pm
cpan/CPANPLUS/lib/CPANPLUS/Config.pm
cpan/CPANPLUS/lib/CPANPLUS/Dist.pm
cpan/CPANPLUS/lib/CPANPLUS/Error.pm
cpan/CPANPLUS/lib/CPANPLUS/Internals.pm
cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants/Report.pm
cpan/CPANPLUS/lib/CPANPLUS/Internals/Report.pm
cpan/CPANPLUS/lib/CPANPLUS/Internals/Source/SQLite.pm
cpan/CPANPLUS/lib/CPANPLUS/Internals/Utils.pm
cpan/CPANPLUS/lib/CPANPLUS/Module.pm
cpan/CPANPLUS/lib/CPANPLUS/Selfupdate.pm
cpan/CPANPLUS/lib/CPANPLUS/Shell/Default.pm
cpan/CPANPLUS/t/19_CPANPLUS-Dist.t
cpan/CPANPLUS/t/40_CPANPLUS-Internals-Report.t
cpan/CPANPLUS/t/inc/conf.pl

index 54998d0..42b4010 100755 (executable)
@@ -395,7 +395,7 @@ use File::Glob qw(:case);
     'CPANPLUS' =>
        {
        'MAINTAINER'    => 'kane',
-       'DISTRIBUTION'  => 'BINGOS/CPANPLUS-0.90.tar.gz',
+       'DISTRIBUTION'  => 'BINGOS/CPANPLUS-0.9005.tar.gz',
        'FILES'         => q[cpan/CPANPLUS],
        'EXCLUDED'      => [ qr{^inc/},
                             qr{^t/dummy-.*\.hidden$},
index 5ba4556..2fcbdf7 100644 (file)
@@ -624,7 +624,7 @@ sub _default_ban_list {
 
     ^GD$                # Needs c libaries
     ^Berk.*DB           # DB packages require specific options & linking
-    ^DBD::              # DBD drives require database files/headers
+    ^DBD::              # DBD drivers require database files/headers
     ^XML::              # XML modules usually require expat libraries
     Apache              # These usually require apache libraries
     SSL                 # These usually require SSL certificates & libs
index b61771b..192e5c9 100644 (file)
@@ -13,7 +13,7 @@ BEGIN {
     use vars        qw( @EXPORT @ISA $VERSION );
     @EXPORT     =   qw( shell fetch get install );
     @ISA        =   qw( Exporter );
-    $VERSION = "0.90";     #have to hardcode or cpan.org gets unhappy
+    $VERSION = "0.9005";     #have to hardcode or cpan.org gets unhappy
 }
 
 ### purely for backward compatibility, so we can call it from the commandline:
index 740ef1e..06c23d2 100644 (file)
@@ -125,13 +125,13 @@ An example entry would like this:
             },
             {
                 'scheme' => 'ftp',
-                'path' => '/pub/CPAN/',
-                'host' => 'ftp.nl.uu.net'
+                'path' => '/',
+                'host' => 'cpan.hexten.net'
             },
             {
                 'scheme' => 'ftp',
-                'path' => '/pub/CPAN/',
-                'host' => 'cpan.valueclick.com'
+                'path' => '/CPAN/',
+                'host' => 'cpan.cpantesters.org'
             },
             {
                 'scheme' => 'ftp',
index 551b8ec..dafb1ef 100644 (file)
@@ -611,10 +611,10 @@ sub _resolve_prereqs {
         ### part of core?
         if( $modobj->package_is_perl_core ) {
             error(loc("Prerequisite '%1' is perl-core (%2) -- not ".
-                      "installing that. Aborting install",
+                      "installing that. -- Note that the overall ".
+                      "install may fail due to this.",
                       $modobj->module, $modobj->package ) );
-            $flag++;
-            last;
+            next;
         }
 
         ### circular dependency code ###
@@ -672,7 +672,7 @@ sub _resolve_prereqs {
     keys %$prereqs;
 
     ### chdir back to where we started
-    chdir $original_wd;
+    $cb->_chdir( dir => $original_wd );
 
     return 1 unless $flag;
     return;
index 38710a8..42e26aa 100644 (file)
@@ -100,7 +100,9 @@ BEGIN {
     }
 
     sub flush {
-        return reverse $log->flush;
+        my @foo = $log->flush;
+        return unless @foo;
+        return reverse @foo;
     }
 
     sub stack {
index fedcb67..df66b8d 100644 (file)
@@ -42,7 +42,7 @@ use vars qw[@ISA $VERSION];
             CPANPLUS::Internals::Report
         ];
 
-$VERSION = "0.90";
+$VERSION = "0.9005";
 
 =pod
 
index 59a41a6..abdb3c9 100644 (file)
@@ -80,10 +80,10 @@ use constant RELEVANT_TEST_RESULT
                                 my $name = $mod->module;
                                 my $specific;
                                 for my $platform (keys %OS) {
-                                    if( $name =~ /\b$platform\b/i ) {
+                                    if( $name =~ /^$platform\b/i ) {
                                         # beware the Mac != MAC
                                         next if($platform eq 'Mac' &&
-                                                $name !~ /\b$platform\b/);
+                                                $name !~ /^$platform\b/);
                                         $specific++;
                                         return 1 if
                                             $^O =~ /^(?:$OS{$platform})$/
index 774c6b9..24e49d4 100644 (file)
@@ -63,7 +63,7 @@ otherwise.
 
     my $send_list = {
         %$query_list,
-        'Test::Reporter' => '1.34',
+        'Test::Reporter' => '1.54',
     };
 
     sub _have_query_report_modules {
@@ -317,6 +317,7 @@ sub _send_report {
     my $name    = $mod->module;
     my $dist    = $mod->package_name . '-' . $mod->package_version;
     my $author  = $mod->author->author;
+    my $distfile= $mod->author->cpanid . "/" . $mod->package;
     my $email   = $mod->author->email || CPAN_MAIL_ACCOUNT->( $author );
     my $cp_conf = $conf->get_conf('cpantest') || '';
     my $int_ver = $CPANPLUS::Internals::VERSION;
@@ -512,6 +513,7 @@ sub _send_report {
         Test::Reporter->new(
             grade           => $grade,
             distribution    => $dist,
+            distfile        => $distfile,
             via             => "CPANPLUS $int_ver",
             timeout         => $conf->get_conf('timeout') || 60,
             debug           => $conf->get_conf('debug'),
index a0ddf49..5061ad3 100644 (file)
@@ -51,6 +51,7 @@ CPANPLUS::Internals::Source::SQLite - SQLite implementation
                         { AutoCommit => 1 }
                     );
         #$Dbh->dbh->trace(1);
+        $Dbh->query(qq{PRAGMA synchronous = OFF});
 
         return $Dbh;        
     };
@@ -118,7 +119,7 @@ CPANPLUS::Internals::Source::SQLite - SQLite implementation
     sub _standard_trees_completed   { return $used_old_copy }
     sub _custom_trees_completed     { return }
     ### finish transaction
-    sub _finalize_trees             { $_[0]->__sqlite_dbh->query('COMMIT'); return 1 }
+    sub _finalize_trees             { $_[0]->__sqlite_dbh->commit; return 1 }
 
     ### saves current memory state, but not implemented in sqlite
     sub _save_state                 { 
@@ -155,8 +156,8 @@ CPANPLUS::Internals::Source::SQLite - SQLite implementation
         ### keep counting how many we inserted
         unless( ++$txn_count % TXN_COMMIT ) {
             #warn "Committing transaction $txn_count";
-            $dbh->query('COMMIT') or error( $dbh->error ); # commit previous transaction
-            $dbh->query('BEGIN')  or error( $dbh->error ); # and start a new one
+            $dbh->commit or error( $dbh->error ); # commit previous transaction
+            $dbh->begin_work  or error( $dbh->error ); # and start a new one
         }
         
         $dbh->query( 
@@ -201,8 +202,8 @@ CPANPLUS::Internals::Source::SQLite - SQLite implementation
         ### keep counting how many we inserted
         unless( ++$txn_count % TXN_COMMIT ) {
             #warn "Committing transaction $txn_count";
-            $dbh->query('COMMIT') or error( $dbh->error ); # commit previous transaction
-            $dbh->query('BEGIN')  or error( $dbh->error ); # and start a new one
+            $dbh->commit or error( $dbh->error ); # commit previous transaction
+            $dbh->begin_work  or error( $dbh->error ); # and start a new one
         }
         
         $dbh->query( 
@@ -319,7 +320,46 @@ sub __sqlite_create_db {
         error( $dbh->error );
         return;
     };        
-        
+
+    $dbh->query( qq[
+        /* the module index */
+        CREATE INDEX IX_module_module ON module (
+            module
+        );
+
+        \n]
+
+    ) or do {
+        error( $dbh->error );
+        return;
+    };
+
+    $dbh->query( qq[
+        /* the version index */
+        CREATE INDEX IX_module_version ON module (
+            version
+        );
+
+        \n]
+
+    ) or do {
+        error( $dbh->error );
+        return;
+    };
+
+    $dbh->query( qq[
+        /* the module-version index */
+        CREATE INDEX IX_module_module_version ON module (
+            module, version
+        );
+
+        \n]
+
+    ) or do {
+        error( $dbh->error );
+        return;
+    };
+
     return 1;    
 }
 
index 27d2abc..8475c36 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use CPANPLUS::Error;
 use CPANPLUS::Internals::Constants;
 
-use Cwd qw[chdir];
+use Cwd                         qw[chdir cwd];
 use File::Copy;
 use Params::Check               qw[check];
 use Module::Load::Conditional   qw[can_load];
index 9e4b67e..2122c6d 100644 (file)
@@ -1001,6 +1001,7 @@ sub install {
         $self->extract( %$params ) or return;
     }
 
+    $args->{'prereq_format'} = $format if $format;
     $format ||= $self->status->installer_type;
 
     unless( $format ) {
index 48f918c..0118e43 100644 (file)
@@ -4,6 +4,7 @@ use strict;
 use Params::Check               qw[check];
 use IPC::Cmd                    qw[can_run];
 use CPANPLUS::Error             qw[error msg];
+use Module::Load::Conditional   qw[check_install];
 use Locale::Maketext::Simple    Class => 'CPANPLUS', Style => 'gettext';
 
 use CPANPLUS::Internals::Constants;
@@ -46,7 +47,7 @@ CPANPLUS::Selfupdate
             'Locale::Maketext::Simple'  => '0.01',
             'Log::Message'              => '0.01',
             'Module::Load'              => '0.10',
-            'Module::Load::Conditional' => '0.31_01', # returns dir for loaded
+            'Module::Load::Conditional' => '0.38', # returns dir for loaded
                                                    # modules
             'version'                   => '0.73', # needed for M::L::C
                                                    # addresses #24630 and 
@@ -67,6 +68,8 @@ CPANPLUS::Selfupdate
             'Module::Loaded'            => '0.01',
             'Parse::CPAN::Meta'         => '0.02', # config_requires support
             'ExtUtils::Install'         => '1.42', # uninstall outside @INC
+            ( check_install( module => 'CPANPLUS::Dist::Build' ) 
+              ? ( 'CPANPLUS::Dist::Build' => '0.24' ) : () ),
         },
     
         features => {
index a9d5142..f59d711 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.90";
+    $VERSION = "0.9005";
 }
 
 load CPANPLUS::Shell;
@@ -1222,6 +1222,7 @@ sub _set_conf {
 
     my ($type,$key,$value) = $input =~ m/(\w+)\s*(\w*)\s*(.*?)$/;
     $value =~ s/\s+$//g if $value;
+    $type = '' unless defined $type;
     $type = lc $type;
 
     if( $type eq 'reconfigure' ) {
index cb0cd33..ee7b564 100644 (file)
@@ -199,13 +199,6 @@ ok( $Mod,                       "Got module object" );
                             "   Dist installation failed recorded ok" ) },
             ],
 
-            "Set dependency to be perl-core" => [
-                sub { $cb->module_tree( $ModPrereq )->package(
-                                        'perl-5.8.1.tar.gz' );  'install' },
-                sub { like( CPANPLUS::Error->stack_as_string,
-                      qr/Prerequisite '$ModPrereq' is perl-core/s,
-                            "   Dist installation failed recorded ok" ) },
-            ],
             'Simple ignore'     => [
                 sub { 'ignore' },
                 sub { ok( !$_[0]->status->prepared,
@@ -254,6 +247,14 @@ ok( $Mod,                       "Got module object" );
                             "   Module status says installed" ) },
             ],
 
+            "Set dependency to be perl-core" => [
+                sub { $cb->module_tree( $ModPrereq )->package(
+                                        'perl-5.8.1.tar.gz' );  'install' },
+                sub { like( CPANPLUS::Error->stack_as_string,
+                      qr/Prerequisite '$ModPrereq' is perl-core/s,
+                            "   Dist installation failed recorded ok" ) },
+            ],
+
             'Install from conf' => [
                 sub { $conf->set_conf(prereqs => PREREQ_INSTALL);   '' },
                 sub { ok( $_[0]->status->prepared,
index ecce8a5..066d5be 100644 (file)
@@ -180,7 +180,7 @@ my $map = {
 
         ### test non-relevant tests ###
         my $cp = $Mod->clone;
-        $cp->module( $Mod->module . '::' . ($^O eq 'beos' ? 'MSDOS' : 'Be') );
+        $cp->module( ($^O eq 'beos' ? 'MSDOS' : 'Be') . '::' . $cp->module );
         ok(!RELEVANT_TEST_RESULT->($cp),"Test is irrelevant");
     }
 
index ca64731..44b358c 100644 (file)
@@ -31,11 +31,11 @@ BEGIN {
     ### and friends get picked up
     $old_env_path = $ENV{PATH};
     if ( $ENV{PERL_CORE} ) {
-      $ENV{'PATH'}  = join $Config{'path_sep'},
+      $ENV{'PATH'}  = join $Config{'path_sep'}, 
                     grep { defined } "$FindBin::Bin/../../../utils", $ENV{'PATH'};
     }
     else {
-      $ENV{'PATH'}  = join $Config{'path_sep'},
+      $ENV{'PATH'}  = join $Config{'path_sep'}, 
                     grep { defined } "$FindBin::Bin/../bin", $ENV{'PATH'};
     }