[debhelper-devel] Bug#798116: debhelper: doit_in_sourcedir/doit_in_builddir fail to chdir back on exceptions, breaking config.log output with -B

Colin Watson cjwatson at debian.org
Sat Sep 5 19:59:47 UTC 2015


Package: debhelper
Version: 9.20150811
Severity: normal
Tags: patch

dh_auto_configure's very useful code to dump out config.log on failures
doesn't work when using -B to have a separate build directory, as you
can see here:

  https://buildd.debian.org/status/fetch.php?pkg=grub2&arch=ppc64el&ver=2.02~beta2-27&stamp=1441370730&file=log

This is because, when doit_in_sourcedir/doit_in_builddir raise an
exception, their code to chdir back to the original directory is
bypassed, and so the exception handler in
Debian::Debhelper::Buildsystem::autoconf runs from the wrong directory
and fails to find config.log.  The attached patch arranges that the
chdir-back always happens before further propagating the exception.

Thanks,

-- 
Colin Watson                                       [cjwatson at debian.org]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-doit_in_sourcedir-doit_in_builddir-exception-han.patch
Type: text/x-diff
Size: 2252 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20150905/009eea25/attachment-0003.patch>


More information about the debhelper-devel mailing list