[Bps-public-commit] r13713 - in Shipwright/trunk: share/bin
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Jul 1 10:58:05 EDT 2008
Author: sunnavy
Date: Tue Jul 1 10:58:03 2008
New Revision: 13713
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/share/bin/shipwright-builder
Log:
r13969 at sunnavys-mb: sunnavy | 2008-07-01 22:55:02 +0800
updated builder to record installed dists
Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder (original)
+++ Shipwright/trunk/share/bin/shipwright-builder Tue Jul 1 10:58:03 2008
@@ -116,6 +116,20 @@
}
}
+my $installed;
+my $installed_hash = {};
+my $installed_file =
+ File::Spec->catfile( $args{'install-base'}, 'installed.yml' );
+if ( -e $installed_file ) {
+ $installed =
+ YAML::Tiny->read(
+ File::Spec->catfile( $args{'install-base'}, 'installed.yml' ) );
+ $installed_hash = { map { $_ => 1 } @{ $installed->[0] } };
+}
+else {
+ $installed = YAML::Tiny->new;
+}
+
# calculate the real order
if ( $args{only} ) {
@$order = grep { $args{only}->{$_} } @$order;
@@ -128,6 +142,9 @@
} @$order;
}
+# remove the already installed ones
+@$order = grep { !$installed_hash->{$_} } @$order;
+
my $log;
if ( $args{'only-test'} ) {
@@ -266,6 +283,7 @@
for my $dist (@$order) {
install($dist);
+ record($dist);
chdir $build_base;
}
@@ -579,3 +597,9 @@
return;
}
+sub record {
+ my $dist = shift;
+ push @{ $installed->[0] }, $dist;
+ $installed->write($installed_file);
+}
+
More information about the Bps-public-commit
mailing list