Update CPANPLUS-Dist-Build to CPAN version 0.62
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 14 Feb 2012 09:41:51 +0000 (09:41 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 14 Feb 2012 09:41:51 +0000 (09:41 +0000)
  [DELTA]

  0.62 Mon Feb 13 22:15:57 GMT 2012
    - Test reporting enhancements

Porting/Maintainers.pl
cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm
cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build/Constants.pm
pod/perldelta.pod

index fe0f34d..111489d 100755 (executable)
@@ -468,7 +468,7 @@ use File::Glob qw(:case);
 
     'CPANPLUS::Dist::Build' => {
         'MAINTAINER'   => 'bingos',
-        'DISTRIBUTION' => 'BINGOS/CPANPLUS-Dist-Build-0.60.tar.gz',
+        'DISTRIBUTION' => 'BINGOS/CPANPLUS-Dist-Build-0.62.tar.gz',
         'FILES'        => q[cpan/CPANPLUS-Dist-Build],
         'EXCLUDED'     => [
             qr{^inc/},
index e3dcee5..702d606 100644 (file)
@@ -30,7 +30,7 @@ use Locale::Maketext::Simple    Class => 'CPANPLUS', Style => 'gettext';
 
 local $Params::Check::VERBOSE = 1;
 
-$VERSION = '0.60';
+$VERSION = '0.62';
 
 =pod
 
@@ -269,7 +269,8 @@ sub prepare {
     my @buildflags = $dist->_buildflags_as_list( $buildflags );
     $dist->status->_buildflags( $buildflags );
 
-    my $fail;
+    my $fail; my $prereq_fail;
+    my $status = { };
     RUN: {
         # 0.85_01
         ### we resolve 'configure requires' here, so we can run the 'perl
@@ -298,6 +299,7 @@ sub prepare {
                             "-- aborting install",
                             'configure_requires', $self->module ) );
                 $dist->status->prepared(0);
+                $prereq_fail++;
                 $fail++;
                 last RUN;
             }
@@ -318,6 +320,10 @@ sub prepare {
                                 verbose => $verbose )
         ) {
             error( loc( "Build.PL failed: %1", $prep_output ) );
+            if ( $conf->get_conf('cpantest') ) {
+               $status->{stage} = 'prepare';
+               $status->{capture} = $prep_output;
+            }
             $fail++; last RUN;
         }
 
@@ -333,11 +339,12 @@ sub prepare {
     }
 
     ### send out test report? ###
-    if( $fail and $conf->get_conf('cpantest') ) {
+    if( $fail and $conf->get_conf('cpantest') and not $prereq_fail ) {
            $cb->_send_report(
             module  => $self,
             failed  => $fail,
             buffer  => CPANPLUS::Error->stack_as_string,
+            status  => $status,
             verbose => $verbose,
             force   => $force,
         ) or error(loc("Failed to send test report for '%1'",
@@ -567,6 +574,7 @@ sub create {
     $dist->status->_buildflags( $buildflags );
 
     my $fail; my $prereq_fail; my $test_fail;
+    my $status = { };
     RUN: {
 
         my @run_perl    = ( '-e', CPDB_PERL_WRAPPER );
@@ -610,6 +618,10 @@ sub create {
         ) {
             error( loc( "MAKE failed:\n%1", $captured ) );
             $dist->status->build(0);
+            if ( $conf->get_conf('cpantest') ) {
+               $status->{stage} = 'build';
+               $status->{capture} = $captured;
+            }
             $fail++; last RUN;
         }
 
@@ -645,6 +657,10 @@ sub create {
                                       $self, $@ )
                 ) {
                     $dist->status->test(0);
+                    if ( $conf->get_conf('cpantest') ) {
+                      $status->{stage} = 'test';
+                      $status->{capture} = $test_output;
+                    }
                     $fail++; last RUN;
                 }
 
@@ -652,6 +668,10 @@ sub create {
             else {
                 msg( loc( "MAKE TEST passed:\n%1", $test_output ), 0 );
                 $dist->status->test(1);
+                if ( $conf->get_conf('cpantest') ) {
+                   $status->{stage} = 'test';
+                   $status->{capture} = $test_output;
+                }
             }
         }
         else {
@@ -669,6 +689,7 @@ sub create {
             module          => $self,
             failed          => $test_fail || $fail,
             buffer          => CPANPLUS::Error->stack_as_string,
+            status          => $status,
             verbose         => $verbose,
             force           => $force,
             tests_skipped   => $skiptest,
index 0ca9c90..c0fa040 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
     require Exporter;
     use vars    qw[$VERSION @ISA @EXPORT];
 
-    $VERSION    = '0.60';
+    $VERSION    = '0.62';
     @ISA        = qw[Exporter];
     @EXPORT     = qw[ BUILD_DIR BUILD CPDB_PERL_WRAPPER];
 }
index 9a8f9cf..1242bf7 100644 (file)
@@ -313,6 +313,10 @@ L<CPAN::Meta::YAML> has been upgraded from version 0.005 to version 0.007.
 
 =item *
 
+L<CPANPLUS::Dist::Build> has been upgraded from version 0.60 to version 0.62.
+
+=item *
+
 L<DB_File> has been upgraded from version 1.824 to version 1.826.
 
 =item *