[Bps-public-commit] r10021 - bpsbuilder/BPB/lib/BPB/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Dec 20 02:56:49 EST 2007


Author: sunnavy
Date: Thu Dec 20 02:56:46 2007
New Revision: 10021

Modified:
   bpsbuilder/BPB/lib/BPB/Source/Base.pm

Log:
added keep_recommends config for source

Modified: bpsbuilder/BPB/lib/BPB/Source/Base.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Source/Base.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Source/Base.pm	Thu Dec 20 02:56:46 2007
@@ -10,7 +10,8 @@
 
 use base qw/Class::Accessor::Fast/;
 __PACKAGE__->mk_accessors(
-    qw/source directory download_directory follow min_perl_version map_path skip map/
+    qw/source directory download_directory follow min_perl_version map_path
+    skip map keep_recommends/
 );
 
 =head2 new
@@ -57,7 +58,15 @@
         my $require = {};
         if ( -e $meta_path ) {
             my $meta = BPB::Config::LoadFile($meta_path);
-            $require = $meta->{requires};
+            if ( $self->keep_recommends ) {
+                %$require = (
+                    %{ $meta->{requires}   || {} },
+                    %{ $meta->{recommends} || {} }
+                );
+            }
+            else {
+                %$require = %{$meta->{requires} || {} };
+            }
         }
         BPB::Config::DumpFile( $require_path, $require );
     }



More information about the Bps-public-commit mailing list