[Bps-public-commit] Shipwright branch, master, updated. e7260a470a2aa4ef4c99f316ea72fd82f9a10744

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Jul 17 12:36:39 EDT 2009


The branch, master has been updated
       via  e7260a470a2aa4ef4c99f316ea72fd82f9a10744 (commit)
       via  24d25b82659329554489b45877c8f041245f1063 (commit)
       via  1f8298889c56718f808a764a50fe163df1e74113 (commit)
      from  07a319c99e637b9e3a0a4d23a420cf96ef9fb86d (commit)

Summary of changes:
 share/bin/shipwright-builder |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 1f8298889c56718f808a764a50fe163df1e74113
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jul 17 22:59:47 2009 +0800

    make as default

diff --git a/share/bin/shipwright-builder b/share/bin/shipwright-builder
index 88f9829..d1ff98f 100755
--- a/share/bin/shipwright-builder
+++ b/share/bin/shipwright-builder
@@ -123,7 +123,7 @@ $args{flags} = {
 $args{with} = { map { split /=/ } split /\s*,\s*/, $args{with} || '' };
 $args{branches} = { map { split /=/ } split /\s*,\s*/, $args{branches} || '' };
 $args{make} ||= 'make';
-$args{as} ||= '';
+$args{as} ||= 'default';
 
 if ( $args{only} ) {
     $args{only} = { map { $_ => 1 } split /\s*,\s*/, $args{only} };

commit 24d25b82659329554489b45877c8f041245f1063
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jul 17 23:01:07 2009 +0800

    remove usr/s?bin-wrapped too before building

diff --git a/share/bin/shipwright-builder b/share/bin/shipwright-builder
index d1ff98f..c44c7a7 100755
--- a/share/bin/shipwright-builder
+++ b/share/bin/shipwright-builder
@@ -349,12 +349,15 @@ sub install {
     chmod oct 755,
       catfile( $args{'install-base'}, 'tools', 'shipwright-utility' );
 
-    if ( $args{as} ) {
         # remove bin-wrapped, sbin-wrapped and lib if it's symbolic link
-        for my $r ( qw/bin-wrapped sbin-wrapped lib/ ) {
-            my $dir = catfile( $args{'install-base'}, $r );
-            unlink $dir if -l $dir;
-        }
+    for my $r (
+        'bin-wrapped', 'sbin-wrapped', 'lib',
+        catdir( 'usr', 'bin-wrapped' ),
+        catdir( 'usr', 'sbin-wrapped' )
+      )
+    {
+        my $dir = catfile( $args{'install-base'}, $r );
+        unlink $dir if -l $dir;
     }
 
     mkdir 'dists' unless -e 'dists';

commit e7260a470a2aa4ef4c99f316ea72fd82f9a10744
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jul 18 00:24:46 2009 +0800

    remove s?bin if it is a new install

diff --git a/share/bin/shipwright-builder b/share/bin/shipwright-builder
index c44c7a7..3e83b16 100755
--- a/share/bin/shipwright-builder
+++ b/share/bin/shipwright-builder
@@ -349,17 +349,30 @@ sub install {
     chmod oct 755,
       catfile( $args{'install-base'}, 'tools', 'shipwright-utility' );
 
-        # remove bin-wrapped, sbin-wrapped and lib if it's symbolic link
+    # remove (usr/)?bin-wrapped, (usr/)?sbin-wrapped and lib if 
+    # they are symbolic links
     for my $r (
         'bin-wrapped', 'sbin-wrapped', 'lib',
         catdir( 'usr', 'bin-wrapped' ),
-        catdir( 'usr', 'sbin-wrapped' )
+        catdir( 'usr', 'sbin-wrapped' ),
       )
     {
-        my $dir = catfile( $args{'install-base'}, $r );
+        my $dir = catdir( $args{'install-base'}, $r );
         unlink $dir if -l $dir;
     }
 
+    # remove (usr/)?s?bin if it's an install from start
+    unless ( keys %$installed_hash ) {
+        for my $r ( 'bin', 'sbin', catdir( 'usr', 'bin' ),
+            catdir( 'usr', 'sbin' ), )
+        {
+            my $dir = catdir( $args{'install-base'}, $r );
+            next unless -e $dir;
+            system("rm -rf $dir");
+        }
+    }
+
+
     mkdir 'dists' unless -e 'dists';
     for my $dist (@$order) {
         _install( $dist, $log );

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list