Package: sbuild Version: 0.73.0-4 Severity: normal Hi. I tried to sbuild packages for ubuntu 14.04 (ubuntu chroot, sbuild running on debian/sid), and ran into a few issues. Attached patches fix some of those issues. The commit logs describe the issues and solutions.
Thanks!
>From a7e5edbfe55b096c991c31e595b8da4071194058 Mon Sep 17 00:00:00 2001 From: Dima Kogan <dmitriy.ko...@jpl.nasa.gov> Date: Sat, 18 Nov 2017 01:41:59 -0800 Subject: [PATCH 1/2] I now detect more directly if the source wasn't yet unpacked In check_space() we look at $self->get('DSC Dir')==undef to determine if the source was unpacked, and if defined($self->get('DSC Dir')), we do stuff with the source. I am observing that that this is set independently of the source being unpacked, so now I actually look at the directory to make this determination --- lib/Sbuild/Build.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm index 9a767a20..ece9b332 100644 --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -2674,15 +2674,17 @@ sub check_space { my $sum = 0; my $dscdir = $self->get('DSC Dir'); + my $build_dir = $self->get('Build Dir'); + my $pkgbuilddir = "$build_dir/$dscdir"; - # if the source package was not yet unpacked, then DSC Dir is undefined - # and we will not attempt to compute the required space - if (!defined $dscdir) { + # if the source package was not yet unpacked, we will not attempt to compute + # the required space. + unless( defined $dscdir && -d $dscdir) + { return -1; } - my $build_dir = $self->get('Build Dir'); - my $pkgbuilddir = "$build_dir/$dscdir"; + my ($space, $spacenum); # get the required space for the unpacked source package in the chroot -- 2.14.1
>From 258865a74c5abf3a03a5a3dafe2d2911b4e5d6f7 Mon Sep 17 00:00:00 2001 From: Dima Kogan <dmitriy.ko...@jpl.nasa.gov> Date: Sat, 18 Nov 2017 01:45:01 -0800 Subject: [PATCH 2/2] dose3 failures no longer mask the --build-deps-failed-commands The code logic had a bug where if dose3 fails, the commands do not run. No longer. --- lib/Sbuild/Build.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm index ece9b332..7e96e40d 100644 --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -940,11 +940,12 @@ sub run_fetch_install_packages { failstage => "run-build-failed-commands"); } } elsif($self->get('Pkg Fail Stage') eq 'install-deps' ) { + my $could_not_explain = undef; + if (defined $self->get_conf('BD_UNINSTALLABLE_EXPLAINER') && $self->get_conf('BD_UNINSTALLABLE_EXPLAINER') ne '') { if (!$self->explain_bd_uninstallable()) { - Sbuild::Exception::Build->throw(error => "Failed to explain bd-uninstallable", - failstage => "explain-bd-uninstallable"); + $could_not_explain = 1; } } @@ -952,6 +953,11 @@ sub run_fetch_install_packages { Sbuild::Exception::Build->throw(error => "Failed to execute build-deps-failed-commands", failstage => "run-build-deps-failed-commands"); } + + if( $could_not_explain ) { + Sbuild::Exception::Build->throw(error => "Failed to explain bd-uninstallable", + failstage => "explain-bd-uninstallable"); + } } } -- 2.14.1