[Bps-public-commit] r18404 - in Shipwright/trunk: lib/Shipwright/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Feb 15 02:36:10 EST 2009


Author: sunnavy
Date: Sun Feb 15 02:36:10 2009
New Revision: 18404

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Source/Base.pm

Log:
 r19877 at sunnavys-mb:  sunnavy | 2009-02-15 15:25:46 +0800
 permit the makefile.pl to die with clean inc, but we need to run it again without clean inc if this happens


Modified: Shipwright/trunk/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Base.pm	Sun Feb 15 02:36:10 2009
@@ -99,7 +99,15 @@
         chdir catdir($path);
 
         if ( -e 'Build.PL' ) {
-            Shipwright::Util->run( [ $^X, '-Mversion', '-MModule::Build', '-MShipwright::Util::CleanINC', 'Build.PL' ] );
+            Shipwright::Util->run(
+                [
+                    $^X,               '-Mversion',
+                    '-MModule::Build', '-MShipwright::Util::CleanINC',
+                    'Build.PL'
+                ],
+                1, # don't die if this fails
+            );
+            Shipwright::Util->run( [ $^X, 'Build.PL' ] );
             my $source = read_file( catfile( '_build', 'prereqs' ) )
               or confess "can't read _build/prereqs: $!";
             my $eval = '$require = ' . $source;
@@ -208,7 +216,17 @@
                 $shipwright_makefile .= $makefile;
                 write_file( 'shipwright_makefile.pl', $shipwright_makefile );
 
-                Shipwright::Util->run( [ $^X, '-Mversion', '-MShipwright::Util::CleanINC', 'shipwright_makefile.pl' ] );
+                Shipwright::Util->run(
+                    [
+                        $^X,
+                        '-Mversion',
+                        '-MShipwright::Util::CleanINC',
+                        'shipwright_makefile.pl'
+                    ],
+                    1, # don't die if this fails
+                );
+                Shipwright::Util->run( [ $^X, 'shipwright_makefile.pl' ] )
+                  if $?;
                 my $prereqs = read_file( catfile('shipwright_prereqs') )
                   or confess "can't read prereqs: $!";
                 eval $prereqs or confess "eval error: $@";    ## no critic
@@ -219,7 +237,21 @@
             else {
 
                 # we extract the deps from Makefile
-                Shipwright::Util->run( [ $^X, '-MShipwright::Util::CleanINC', 'Makefile.PL' ] );
+                Shipwright::Util->run(
+                    [
+                        $^X,
+                        '-MShipwright::Util::CleanINC',
+                        'Makefile.PL'
+                    ],
+                    1, # don't die if this fails
+                );
+                Shipwright::Util->run(
+                    [
+                        $^X,
+                        'Makefile.PL'
+                    ]
+                ) if $?;
+
                 my ($source) = grep { /PREREQ_PM/ } read_file('Makefile');
                 if ( $source && $source =~ /({.*})/ ) {
                     my $eval .= '$require = ' . $1;



More information about the Bps-public-commit mailing list