[buildd-tools-devel] [PATCH 1/4] Fix run_fetch_install_packages so native builds work as well as cross Issue was that if $crosscoredeps is not defined the code barfs on @{$crosscoredeps->{$self->get_conf('HOST_ARCH'), rather than it just being empty. This code can be improved by a competent perl person.
Wookey
wookey at wookware.org
Tue Jan 17 03:07:34 UTC 2012
---
lib/Sbuild/Build.pm | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index c004781..9701c83 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -626,12 +626,15 @@ sub run_fetch_install_packages {
$self->check_abort();
$self->set('Install Start Time', time);
$self->set('Install End Time', $self->get('Install Start Time'));
- my @coredeps = @{$self->get_conf('CORE_DEPENDS')};
- my $crosscoredeps;
- if ($self->get_conf('HOST_ARCH') ne $self->get_conf('BUILD_ARCH')) {
- $crosscoredeps = $self->get_conf('CROSSBUILD_CORE_DEPENDS');
- }
- $resolver->add_dependencies('CORE', join(", ", @coredeps, @{$crosscoredeps->{$self->get_conf('HOST_ARCH')}}) , "", "", "", "", "");
+ my @coredeps = @{$self->get_conf('CORE_DEPENDS')};
+ if ($self->get_conf('HOST_ARCH') ne $self->get_conf('BUILD_ARCH')) {
+ my $crosscoredeps;
+ $crosscoredeps = $self->get_conf('CROSSBUILD_CORE_DEPENDS');
+ $resolver->add_dependencies('CORE', join(", ", @coredeps, @{$crosscoredeps->{$self->get_conf('HOST_ARCH')}}) , "", "", "", "", "");
+ } else {
+ $resolver->add_dependencies('CORE', join(", ", @coredeps) , "", "", "", "", "");
+ }
+
if (!$resolver->install_deps('core', 'CORE')) {
Sbuild::Exception::Build->throw(error => "Core build dependencies not satisfied; skipping",
failstage => "install-deps");
--
1.7.7.3
More information about the Buildd-tools-devel
mailing list