chiark / gitweb /
dgit: Better error message if non-split-brain patch stack no longer applies
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Oct 2016 18:50:16 +0000 (19:50 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Oct 2016 00:01:11 +0000 (01:01 +0100)
(due to new upstream version, or user messing with it). Closes:#833025.

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

index 8c3311a2bdf92e574fef44b3bc920a9772f13cfc..f8363904204aad47572cd87300f32fb66380e36e 100644 (file)
@@ -44,6 +44,9 @@ dgit (1.5~~) unstable; urgency=medium
   * New tag format (for dgit view) archive/debian/VERSION.
   * Before committing to push, check that .dsc and .changes correspond.
     Closes:#800060.
+  * Better error message if non-split-brain patch stack no longer
+    applies (due to new upstream version, or user messing with it).
+    Closes:#833025.
 
   Infrastructure:
   * Better error handling in dgit-repos-policy-debian.
diff --git a/dgit b/dgit
index fa926dd0096d4db23a4a5af959030f6f4ccef7f2..c1b1c25374aeaae483ccee3fbb67bdb229d66863 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4456,8 +4456,17 @@ sub quilt_fixup_multipatch ($$$) {
 
     ensuredir '.pc';
 
-    runcmd qw(sh -ec),
-        'exec dpkg-source --before-build . >/dev/null';
+    my @bbcmd = (qw(sh -ec), 'exec dpkg-source --before-build . >/dev/null');
+    $!=0; $?=-1;
+    if (system @bbcmd) {
+       failedcmd @bbcmd if $? < 0;
+       fail <<END;
+failed to apply your git tree's patch stack (from debian/patches/) to
+ the corresponding upstream tarball(s).  Your source tree and .orig
+ are probably too inconsistent.  dgit can only fix up certain kinds of
+ anomaly (depending on the quilt mode).  See --quilt= in dgit(1).
+END
+    }
 
     changedir '..';