diff mbox

[7/7] Add CROSSBUILD_CORE_DEPENDS{arch} to core deps automatically

Message ID 1324299198-14640-7-git-send-email-wookey@wookware.org
State Accepted
Headers show

Commit Message

Wookey Dec. 19, 2011, 12:53 p.m. UTC
From: Wookey <wookey@wookware.org>

---
 lib/Sbuild/Build.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index 966fb32..05473ec 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -636,7 +636,12 @@  sub run_fetch_install_packages {
 	$self->check_abort();
 	$self->set('Install Start Time', time);
 	$self->set('Install End Time', $self->get('Install Start Time'));
-	$resolver->add_dependencies('CORE', join(", ", @{$self->get_conf('CORE_DEPENDS')}) , "", "", "", "", "");
+    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')}}) , "", "", "", "", "");
 	if (!$resolver->install_deps('core', 'CORE')) {
 	    Sbuild::Exception::Build->throw(error => "Core build dependencies not satisfied; skipping",
 					    failstage => "install-deps");