Package: libsbuild-perl Severity: important Tags: patch Dear Maintainer,
at the moment, sbuild does not check the exit code of some programs executed during build. The places where this hit me today is the execution of "dpkg --info" and "dpkg --contents" in Sbuild::Build. For reasons that deserve further investigation, the build of src:ktp-filetransfer-handler failed on mips for the now wheezy version, resulting in a broken kde-telepathy-filetransfer-handler-dbg_0.4.0-1_mips.deb (md5:f75c141cb9ff74a8e72a404cd0746d64) in the archives. This was logged during build but was unnoticed since sbuild did not check the dpkg exit status but no doubt should have: | -rw-r--r-- root/root 472610 2012-07-06 06:57 ./usr/lib/debug/.build-id/b2/ff24f15bbdecd6ad3d991a6309bea149ad5254.debug | dpkg-deb (subprocess): data: internal gzip read error: '<fd:0>: data error' | dpkg-deb: subprocess <decompress> returned error exit status 2 (...) | Built successfully [ https://buildd.debian.org/status/fetch.php?pkg=ktp-filetransfer-handler&arch=mips&ver=0.4.0-1&stamp=1341557939 ] Invoking dpkg --contents manually on that package results in a non-zero exit code, so sbuild could have catched that. The patch below is *untested* but should do the right thing: Fail if there's anything wrong. The output of dpkg should provide enough information for the human reader. Severity set to important and should perhaps even be higher since this breaks installation of any broken-but-not-detected-as-such package, resulting in additional work for the maintainer. Christoph --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -1669,7 +1669,7 @@ sub build { } else { $self->log($_) while( <PIPE> ); - close( PIPE ); + close( PIPE ) or ($rv = 1); } $self->log("\n"); if (!open( PIPE, "dpkg --contents $deb 2>&1 |" )) { @@ -1677,7 +1677,7 @@ sub build { } else { $self->log($_) while( <PIPE> ); - close( PIPE ); + close( PIPE ) or ($rv = 1); } $self->log("\n"); } -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.10.36 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash
signature.asc
Description: Digital signature