summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-11 00:23:17 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-11 00:58:26 +0100
commita8a18c8f483c03492a114aac2be5e89b8f32f5c8 (patch)
treeade24554ed7c1413f82dd1513cb89bd061da9fb1 /dgit
parent0f37a4cac41ca7dc266b9e9af877f0d6a6e49b01 (diff)
dgit: Add missing error check in single-debian-patch handling
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>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit4
1 files changed, 3 insertions, 1 deletions
diff --git a/dgit b/dgit
index 6b961f5..e35f168 100755
--- 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();