[buildd-tools-devel] Bug#693788: libsbuild-perl: cross build-dep installation failure should be an exception
Colin Watson
cjwatson at ubuntu.com
Tue Nov 20 11:07:58 UTC 2012
Package: libsbuild-perl
Version: 0.63.2-1
Severity: minor
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch raring
There doesn't seem an obvious reason why cross build-dependency
installation failure is implemented by logging a message and returning
1, rather than by throwing an exception; and this seems to make it
harder for frontends to programmatically distinguish the type of build
failure. This patch makes it look more like the non-cross path just
above.
diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index e82e4a7..d6e6909 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -680,8 +680,8 @@ sub run_fetch_install_packages {
USER => 'root',
DIR => '/' });
if ($?) {
- $self->log("Failed to get cross build-deps\n");
- return 1;
+ Sbuild::Exception::Build->throw(error => "Package cross build dependencies not satisfied; skipping",
+ failstage => "install-deps");
}
}
$self->set('Install End Time', time);
Thanks,
--
Colin Watson [cjwatson at ubuntu.com]
More information about the Buildd-tools-devel
mailing list