chiark / gitweb /
Produce better error reporting when absurd git wrapper fails on a patch
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 19 Dec 2016 14:45:18 +0000 (14:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 19 Dec 2016 16:58:57 +0000 (16:58 +0000)
during .dsc import.  Apropos of #848391.

gbp swallows the error from the first run (without --whitespace=fix).
Previously only that first run would do anything useful; the second
would complain about --whitespace=fix.  So failures of dpkg-source
would always produce a useless error message.

Instead, tolerate (and ignore) the --whitespace=fix option which gbp
passes during the second run.  This means that the second run tries to
do the actual work.

This only does extra work if the first run failed, and since the first
and second runs are now equivalent, that happens when the second run
fails too.  But in return for that extra work, we get a report which
actually mentions something that unexpectedly went wrong.

(The alternative would be to have absurd/git try to stash and then
reproduce its previous error, or to make more fragile assumptions
about gbp's behaviour.)

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

index 86050082f1d38bc1ceb5f9ecb6472556530bbebd..8300b0b601d9534871b7e0211eeaa4a7783338e5 100755 (executable)
@@ -56,6 +56,9 @@ for arg in "$@"; do
                index=1
                continue
                ;;
+       1.--whitespace=fix)
+               continue
+               ;;
        ?.-*)
                fail "UNKNOWN OPTION $arg ($*)"
                ;;
index bca0690582740c560c52c02a5ffdb9023d8f8ed9..cdd7f25a10c750ae005d68fb92c3b60eddf35999 100644 (file)
@@ -19,6 +19,8 @@ dgit (2.12~) unstable; urgency=medium
     tag, even in non-split-view quilt modes.  Closes:#844129.
   * Do not fail when cloning a package containing dangling symlinks.
     Closes:#848512.
+  * Produce better error reporting when absurd git wrapper fails
+    on a patch during .dsc import.  Apropos of #848391.
 
   Test suite:
   * Provide and use stunt lintian and debuild, to avoid lintian