chiark / gitweb /
Unbreak --dry-run (`exiting subroutine via next', broken in ac221d67, bug released...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 18 Aug 2015 14:15:15 +0000 (15:15 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 18 Aug 2015 14:15:15 +0000 (15:15 +0100)
debian/changelog
dgit

index 1aedb32cbe695c1909c7d844e88e86a3521ee364..886ab3bdea0bd5501a193370b7c386ea2ec2c011 100644 (file)
@@ -1,6 +1,7 @@
 dgit (1.4~~) UNRELEASED; urgency=low
 
-  * 
+  * Unbreak --dry-run (`exiting subroutine via next', broken in
+    ac221d67, bug released in 0.22).
 
  --
 
diff --git a/dgit b/dgit
index 60b39e4ae66d7be7f9f4a07eb736daf36ce2336a..8f0052bf87182d87c1db497c57e8dabcddd8e49b 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1386,7 +1386,8 @@ sub generate_commit_from_dsc () {
            or $!==&ENOENT
            or die "$f $!";
 
-       complete_file_from_dsc('.', $fi);
+       complete_file_from_dsc('.', $fi)
+           or next;
 
        if (is_orig_file($f)) {
            link $f, "../../../../$f"
@@ -1484,7 +1485,7 @@ sub complete_file_from_dsc ($$) {
        die "$f ?" unless $f =~ m/^\Q${package}\E_/;
        die "$f ?" if $f =~ m#/#;
        runcmd_ordryrun_local @curl,qw(-o),$tf,'--',"$furl";
-       next if !act_local();
+       return 0 if !act_local();
        $downloaded = 1;
     }
 
@@ -1498,13 +1499,16 @@ sub complete_file_from_dsc ($$) {
            " demands hash $fi->{Hash} ".
            ($downloaded ? "(got wrong file from archive!)"
             : "(perhaps you should delete this file?)");
+
+    return 1;
 }
 
 sub ensure_we_have_orig () {
     foreach my $fi (dsc_files_info()) {
        my $f = $fi->{Filename};
        next unless is_orig_file($f);
-       complete_file_from_dsc('..', $fi);
+       complete_file_from_dsc('..', $fi)
+           or next;
     }
 }