[Bps-public-commit] r10439 - in bpsbuilder/Shipwright/lib/Shipwright: Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Jan 23 04:18:35 EST 2008
Author: sunnavy
Date: Wed Jan 23 04:18:34 2008
New Revision: 10439
Modified:
bpsbuilder/Shipwright/lib/Shipwright/Script/Import.pm
bpsbuilder/Shipwright/lib/Shipwright/Source/Base.pm
Log:
not require itself
Modified: bpsbuilder/Shipwright/lib/Shipwright/Script/Import.pm
==============================================================================
--- bpsbuilder/Shipwright/lib/Shipwright/Script/Import.pm (original)
+++ bpsbuilder/Shipwright/lib/Shipwright/Script/Import.pm Wed Jan 23 04:18:34 2008
@@ -78,7 +78,7 @@
move(
File::Spec->catfile( $self->source, '__require.yml' ),
File::Spec->catfile( $script_dir, 'require.yml' )
- );
+ ) or die "move __require.yml failed: $!";
$shipwright->backend->import(
source => $self->source,
Modified: bpsbuilder/Shipwright/lib/Shipwright/Source/Base.pm
==============================================================================
--- bpsbuilder/Shipwright/lib/Shipwright/Source/Base.pm (original)
+++ bpsbuilder/Shipwright/lib/Shipwright/Source/Base.pm Wed Jan 23 04:18:34 2008
@@ -64,11 +64,14 @@
$source = read_file( File::Spec->catfile('Build.PL') )
or die "can't read Build.PL: $!";
- if ( $source =~ /use Module::Build/ ) {
+ if ( $source =~ /use Module::Build/
+ && $self->name ne 'Module-Build' )
+ {
unless ( $require->{build_requires}{'Module::Build'} ) {
$require->{build_requires} = { 'Module::Build' => 0 };
}
}
+
Shipwright::Util->run( [ './Build', 'realclean' ] );
}
elsif ( -e 'Makefile.PL' ) {
@@ -79,6 +82,7 @@
$eval =~ s/([\w:]+)=>/'$1'=>/g;
eval $eval or die "eval error: $@";
}
+
for ( keys %$require ) {
$require->{requires}{$_} = delete $require->{$_};
}
@@ -86,7 +90,9 @@
$source = read_file('Makefile.PL')
or die "can't read Makefile.PL: $!";
- if ( grep { /use ExtUtils::MakeMaker/ } $source ) {
+ if ( grep { /use ExtUtils::MakeMaker/ }
+ $source && $self->name ne 'ExtUtils-MakeMaker' )
+ {
unless ( defined $require->{requires}{'ExtUtils::MakeMaker'}
&& $require->{requires}{'ExtUtils::MakeMaker'} >= 6.31 )
{
@@ -126,7 +132,8 @@
}
}
- Shipwright::Config::DumpFile( $require_path, $require );
+ Shipwright::Config::DumpFile( $require_path, $require )
+ or die "can't dump __require.yml: $!";
}
if ( my $require = Shipwright::Config::LoadFile($require_path) ) {
More information about the Bps-public-commit
mailing list