tags 170742 + patch thanks Dear Peter,
It's a long while since you filed this bug, but the work has now been done which allows it to be fixed cleanly. This has been done with a new parameter $conf::sbuild_mode. Set $sbuild_mode = "user"; in /etc/sbuild/sbuild.conf When set to "user", any error in dpkg-buildpackage, or abnormal termination with e.g. SIGTERM, will cause sbuild to exit with a nonzero exit status, rather than returning 0. When set to "buildd", it behaves as a buildd would expect it to (the traditional behaviour). I've put a test release here: http://people.debian.org/~rleigh/sbuild-test/sbuild_0.42_all.deb The sources are all here as well: http://people.debian.org/~rleigh/sbuild-test/ Please could you test it and see if it now behaves to your satisfaction? If it's not completely right, we can always rework the patch. Michael, does this look OK to you? Regards, Roger -- Roger Leigh Printing on GNU/Linux? http://gutenprint.sourceforge.net/ Debian GNU/Linux http://www.debian.org/ GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
Index: sbuild =================================================================== RCS file: /cvsroot/buildd-tools/sbuild/sbuild,v retrieving revision 1.86 diff -u -r1.86 sbuild --- sbuild 9 Mar 2006 23:03:21 -0000 1.86 +++ sbuild 10 Mar 2006 16:46:44 -0000 @@ -118,6 +118,7 @@ $main::cwd = cwd(); $main::ilock_file = "$conf::srcdep_lock_dir/install"; $main::srcdep_lock_cnt = 0; +$main::build_status = 0; $main::pkg_status = ""; $main::pkg_end_time = 0; $main::pkg_start_time = 0; @@ -372,7 +373,8 @@ } my $dscbase = basename( $dscfile ); - $main::pkg_status = "successful" if build( $dscbase, $pkgv ); + $main::build_status = build( $dscbase, $pkgv ); + $main::pkg_status = "successful" if $main::build_status chdir( $main::cwd ); write_jobs_file( $main::pkg_status ); append_to_FINISHED( $pkgv ); @@ -411,8 +413,12 @@ close_log(); unlink( $main::jobs_file ) if $main::batchmode; unlink( "SBUILD-FINISHED" ) if $main::batchmode; +if ($conf::sbuild_mode eq "user") { + exit ($main::build_status == 0) ? 1 : 0; +} exit 0; + sub fetch_source_files { my $dscfile_ref = shift; my $dscfile = $$dscfile_ref; @@ -3290,6 +3296,9 @@ close_log(); unlink( $main::jobs_file ) if $main::batchmode; $? = 0; $! = 0; + if ($conf::sbuild_mode eq "user") { + exit 1; + } exit 0; }
pgpuRqa8xENdl.pgp
Description: PGP signature