[Bps-public-commit] r10755 - Shipwright/lib/Shipwright/Script

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Feb 7 03:11:12 EST 2008


Author: sunnavy
Date: Thu Feb  7 03:11:11 2008
New Revision: 10755

Modified:
   Shipwright/lib/Shipwright/Script/Import.pm

Log:
just warn if one dist isn't found in source dir; skip early if not with --overwrite, also typo fix

Modified: Shipwright/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/lib/Shipwright/Script/Import.pm	(original)
+++ Shipwright/lib/Shipwright/Script/Import.pm	Thu Feb  7 03:11:11 2008
@@ -165,10 +165,21 @@
                 $dist =~ s/::/-/g;
 
                 unless ( $imported{$dist}++ ) {
+
+                    if ( $shipwright->backend->info( "dists/$dist" ) && !
+                            $self->overwrite ) {
+                        warn
+"have $dist in repo already, skip it. use --overwrite to overwrite";
+                        next;
+                    }
+
                     my ($s) = grep { $_ eq $dist } @sources;
-                    warn "we don't have $dist in source which is for "
-                      . $self->source
-                      unless $s;
+                    unless ($s) {
+                        warn "we don't have $dist in source which is for "
+                          . $self->source;
+                        next;
+                    }
+
                     $s = File::Spec->catfile( $dir, $s );
 
                     $self->import_req( $s, $shipwright );
@@ -280,7 +291,7 @@
    --log-level(-l)    specify the log level
    --comment(-m)      specify the comment
    --source(-s)       specify the source path
-   --name             specify the sorce name( only alphanumeric characters and - )
+   --name             specify the source name( only alphanumeric characters and - )
    --build-script     specify the build script
    --require-yml      specify the require.yml
    --follow           follow the dependent chain or not



More information about the Bps-public-commit mailing list