Public bug reported:

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/debug/usr/lib/libQtNetwork.so.4.6.2
-rw-r--r-- root/root 102690734 2012-10-11 18:05 
./usr/lib/debug/usr/lib/libQtGui.so.4.6.2
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:


        $self->log_subsection("Package contents");

        my @debcfiles = @cfiles;
        foreach (@debcfiles) {
            my $deb = "$build_dir/$_";
            next if $deb !~ /(\Q$arch\E|all)\.[\w\d.-]*$/;

            $self->log_subsubsection("$_");
            if (!open( PIPE, "dpkg --info $deb 2>&1 |" )) {
                $self->log("Can't spawn dpkg: $! -- can't dump info\n");
            }
            else {
                $self->log($_) while( <PIPE> );
                close( PIPE );
            }
            $self->log("\n");
            if (!open( PIPE, "dpkg --contents $deb 2>&1 |" )) {
                $self->log("Can't spawn dpkg: $! -- can't dump info\n");
            }
            else {
                $self->log($_) while( <PIPE> );
                close( PIPE );
            }
            $self->log("\n");
        }


Thanks

** Affects: sbuild (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1066966

Title:
  sbuild doesn't fail on all types of failures

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sbuild/+bug/1066966/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to