sbuild doesn't fail on all types of failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sbuild (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I had some builds produce bad packages; sbuild thought the build succeeded, however:
┌──────
│ Package contents │
└──────
...
-rw-r--r-- root/root 11438831 2012-10-11 18:05 ./usr/lib/
-rw-r--r-- root/root 102690734 2012-10-11 18:05 ./usr/lib/
xz: (stdin): Compressed data is corrupt
dpkg-deb (subprocess): subprocess data returned error exit status 1
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
dpkg-deb: error: subprocess tar returned error exit status 2
...
These are not caught by sbuild because the Perl variable $CHILD_ERROR (aka $?) is not being checked after the pipes are closed in Build.pm:
my @debcfiles = @cfiles;
foreach (@debcfiles) {
my $deb = "$build_dir/$_";
next if $deb !~ /(\Q$arch\
if (!open( PIPE, "dpkg --info $deb 2>&1 |" )) {
}
else {
}
if (!open( PIPE, "dpkg --contents $deb 2>&1 |" )) {
}
else {
}
}
Thanks