[Bps-public-commit] r11338 - Shipwright/trunk/share/bin

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Apr 1 11:48:46 EDT 2008


Author: sunnavy
Date: Tue Apr  1 11:48:45 2008
New Revision: 11338

Modified:
   Shipwright/trunk/share/bin/shipwright-builder

Log:
if we find bin/perl in the installed dir, set {perl} to that if it's not set legally before. it's useful when we build a vessel based on another one

Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder	(original)
+++ Shipwright/trunk/share/bin/shipwright-builder	Tue Apr  1 11:48:45 2008
@@ -138,11 +138,13 @@
     close $fh;
 
     unless ( $args{perl} && -e $args{perl} ) {
-        if ( ( grep { $_ eq 'perl' } @$order )
-            && !$args{skip}{perl} )
+        my $perl = File::Spec->catfile( $args{'install-base'}, 'bin', 'perl' );
+
+        # -e $perl makes sense when we install on to another vessel
+        if ( ( ( grep { $_ eq 'perl' } @$order ) && !$args{skip}{perl} )
+            || -e $perl )
         {
-            $args{perl} =
-              File::Spec->catfile( $args{'install-base'}, 'bin', 'perl' );
+            $args{perl} = $perl;
         }
     }
 
@@ -277,14 +279,15 @@
             "$dir-wrapped" );
 
         # return if it's been wrapped already
-        if ( -e File::Spec->catfile( $args{'install-base'}, "$dir-wrapped", $file )
-          )
+        if (
+            -e File::Spec->catfile( $args{'install-base'}, "$dir-wrapped",
+                $file ) )
         {
             print $log 'found '
               . File::Spec->catfile( $args{'install-base'}, "$dir-wrapped",
                 $file )
               . ', skipping' . "\n";
-            return
+            return;
         }
 
         my $type;



More information about the Bps-public-commit mailing list