[Bps-public-commit] r10283 - in bpsbuilder/BPB/lib/BPB: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Jan 11 07:35:23 EST 2008
Author: sunnavy
Date: Fri Jan 11 07:35:22 2008
New Revision: 10283
Modified:
bpsbuilder/BPB/lib/BPB/Build.pm
bpsbuilder/BPB/lib/BPB/Script/Build.pm
Log:
set install-base is not mandatory, added skip-test arg
Modified: bpsbuilder/BPB/lib/BPB/Build.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Build.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Build.pm Fri Jan 11 07:35:22 2008
@@ -7,7 +7,7 @@
use base qw/Class::Accessor::Fast/;
__PACKAGE__->mk_accessors(
- qw/install_base perl build_base skip_test commands log skip/);
+ qw/install_base perl build_base skip_test commands log skip skip_test/);
use File::Spec;
use File::Temp qw/tempdir/;
@@ -42,6 +42,11 @@
$self->$_( $args{$_} ) if $args{$_};
}
+ unless ( $self->install_base ) {
+ $self->install_base( tempdir( CLEANUP => 0 ) );
+ $self->log->info( "we'll install at " . $self->install_base );
+ }
+
$self->log->info( 'run build to install to ' . $self->install_base );
mkdir $self->install_base unless -e $self->install_base;
@@ -57,7 +62,7 @@
BPB::Config::LoadFile( File::Spec->catfile( 'bpb', 'order.yml' ) );
for my $dist (@$order) {
- unless ( grep { $dist eq $dist } @{ $self->skip } ) {
+ unless ( grep { $dist eq $_ } @{ $self->skip } ) {
$self->_install($dist);
}
chdir $self->build_base;
@@ -65,6 +70,7 @@
$self->_wrapper();
+ $self->log->info( "install finished. the dists are at " . $self->install_base );
}
sub _install {
@@ -100,6 +106,8 @@
next if $self->skip_test && $type eq 'test';
+ $self->log->info("build $type in $dir");
+
if ( system($cmd) ) {
$self->log->error("build $dir with failure when run $type: $!");
$error = 1;
Modified: bpsbuilder/BPB/lib/BPB/Script/Build.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Script/Build.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Script/Build.pm Fri Jan 11 07:35:22 2008
@@ -5,7 +5,8 @@
use Carp;
use base qw/App::CLI::Command Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw/config name install_base build_base skip/);
+__PACKAGE__->mk_accessors(
+ qw/config name install_base build_base skip skip_test/ );
use BPB;
@@ -15,6 +16,7 @@
'c|config=s' => 'config',
'i|install-base=s' => 'install_base',
'skip=s' => 'skip',
+ 'skip-test' => 'skip_test',
);
}
@@ -33,6 +35,7 @@
build_skip => $self->skip,
);
$bpb->backend->export( target => $bpb->build->build_base );
+ $bpb->build->skip_test(1) if $self->skip_test;
$bpb->build->run( map { $_ => $self->$_ } qw/install_base/ );
}
More information about the Bps-public-commit
mailing list