Bug#606605: pbuilder test failures

Matthew Palmer mpalmer at debian.org
Sun Dec 12 02:16:19 UTC 2010


tag 606605 +patch
thanks

Matt Taggart wrote:
> I was attempting to backport pbuilder to lenny and while it appears to
> build ok the package build fails due to test failures. Below are the
> errors. Maybe it needs a versioned dependency or the tests are depending
> on something newer than lenny?

It's not a dependency issue, it's actually a reverse bashism (to possibly
coin a phrase) in pbuilder-apt-config.  Although the script is #!/bin/sh, if
you run it with /bin/bash (Lenny's default /bin/sh -- or at least on my
local machine) it fails as you describe, whereas if you run it with bin/dash
/(sid's default /bin/sh -- at least in my sid chroot) it doesn't complain.

This would explain why it succeeds for most people (and the autobuilders) --
most people would be running the build in a sid environment.

(As an aside, why do you feel you need to rebuild the package in Lenny?  It
appears to install fine on my Lenny box).

The root cause is that die(), when called in dash, doesn't actually print
the error and exit.  Instead, the "2>/dev/null || true" at the end of line
451 swallows the error whole.

I don't know enough about bash *or* dash to explain why the difference
in behaviour exists, and who is in the wrong (if any).  However, when I
apply the attached patch, the test suite passes.  It's ugly, but given that
nothing uses pbuilder-apt-config anyway, and if the error was important the
test suite would test it (heh)...

- Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 606605.patch
Type: text/x-diff
Size: 346 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20101212/bffc2900/attachment.patch>


More information about the Pbuilder-maint mailing list