Package: libsbuild-perl
Version: 0.63.2-1
Severity: minor
Tags: patch
User: [email protected]
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                                       [[email protected]]


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to