chiark / gitweb /
dgit: Add missing error check in single-debian-patch handling
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 10 Oct 2018 23:23:17 +0000 (00:23 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 10 Oct 2018 23:58:26 +0000 (00:58 +0100)
We called rename here without checking the error at all.
Handle ENOENT in case dpkg-source makes no patch.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 6b961f5..e35f168 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -5805,7 +5805,9 @@ sub quilt_fixup_singlepatch ($$$) {
     changedir "..";
     runcmd @dpkgsource, qw(-x), (srcfn $version, ".dsc");
     rename srcfn("$upstreamversion", "/debian/patches"), 
-           "work/debian/patches";
+       "work/debian/patches"
+       or $!==ENOENT
+       or confess "install d/patches: $!";
 
     changedir "work";
     commit_quilty_patch();