[Bps-public-commit] r11077 - Shipwright/trunk/lib/Shipwright

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Mar 17 09:34:22 EDT 2008


Author: sunnavy
Date: Mon Mar 17 09:34:22 2008
New Revision: 11077

Modified:
   Shipwright/trunk/lib/Shipwright/Build.pm

Log:
implemented flags part for Build.pm

Modified: Shipwright/trunk/lib/Shipwright/Build.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Build.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Build.pm	Mon Mar 17 09:34:22 2008
@@ -8,7 +8,7 @@
 
 __PACKAGE__->mk_accessors(
     qw/install_base perl build_base skip_test commands log
-      skip only_test force order/
+      skip only_test force order flags/
 );
 
 use File::Spec;
@@ -97,7 +97,23 @@
             )
         );
 
+        my $flags = {};
+
+        if ( -e File::Spec->catfile( 'shipwright', 'flags.yml' ) ) {
+
+            $flags = Shipwright::Util::LoadFile(
+                File::Spec->catfile( 'shipwright', 'flags.yml' ) );
+        }
+
+DIST:
         for my $dist ( @{ $self->order } ) {
+            if ( $flags->{$dist} )
+            {    # undefined means default, will be installed
+                for my $flag ( @{$flags->{$dist}} ) {
+                    next DIST unless $self->flags->{$flag};
+                }
+            }
+
             unless ( $self->skip && $self->skip->{$dist} ) {
                 $self->_install($dist);
             }



More information about the Bps-public-commit mailing list