Control: tag -1 + pending Hi,
On Thu, 3 Dec 2015 12:27:35 +0000 Wookey <woo...@wookware.org> wrote: > > It seems that every new port needs to be registered with > > CROSSBUILD_CORE_DEPENDS. This is annoying, as the work to be done is > > trivial. I'd rather like to have the default be generated using the obvious > > pattern. To that end I am proposing the attached patch. > > This seems sensible, but as I user I like to see an example in the config > file to change (especially in this case where it's a hash, so a bit more > complicated than just setting a variable). > > As the example config file is generated from the defaults IIRC, this will > remove that example, so the docs should be exanpanded to give an example of > how to set it. Also we should explain anyway that now the variable is > defaulted but can be set as an override, so a change to the man page is > warranted. (Sorry no patch right now, got to dash). Thanks, I reworked Helmut's patch a bit so that it includes an example and an extended help message. The attached patch is committed to my local git and will thus likely be part of the next sbuild release. cheers, josch
From 2ed698d92b2d782105606b40a977b63af8f40e65 Mon Sep 17 00:00:00 2001 From: Helmut Grohne <hel...@subdivi.de> Date: Thu, 3 Dec 2015 06:27:44 +0100 Subject: [PATCH] have a default for CROSSBUILD_CORE_DEPENDS (closes: #806931) The current defaults are per-arch and need to be updated for every new architecture. Rather have an architecture-generic default here. --- lib/Sbuild/Build.pm | 7 +++++-- lib/Sbuild/Conf.pm | 19 ++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm index d03401c..6afd28e 100644 --- a/lib/Sbuild/Build.pm +++ b/lib/Sbuild/Build.pm @@ -685,8 +685,11 @@ sub run_fetch_install_packages { my @coredeps = @{$self->get_conf('CORE_DEPENDS')}; if ($self->get('Host Arch') ne $self->get('Build Arch')) { my $crosscoredeps = $self->get_conf('CROSSBUILD_CORE_DEPENDS'); - push(@coredeps, @{$crosscoredeps->{$self->get('Host Arch')}}) - if defined($crosscoredeps->{$self->get('Host Arch')}); + if (defined($crosscoredeps->{$self->get('Host Arch')})) { + push(@coredeps, @{$crosscoredeps->{$self->get('Host Arch')}}); + } else { + push(@coredeps, 'crossbuild-essential-' . $self->get('Host Arch') . ':native'); + } } $resolver->add_dependencies('CORE', join(", ", @coredeps) , "", "", "", "", ""); diff --git a/lib/Sbuild/Conf.pm b/lib/Sbuild/Conf.pm index 41ff488..043bae0 100644 --- a/lib/Sbuild/Conf.pm +++ b/lib/Sbuild/Conf.pm @@ -811,17 +811,14 @@ sub setup ($) { TYPE => 'HASH:ARRAY:STRING', VARNAME => 'crossbuild_core_depends', GROUP => 'Multiarch support (transitional)', - DEFAULT => { arm64 => ['crossbuild-essential-arm64:native'], - armel => ['crossbuild-essential-armel:native'], - armhf => ['crossbuild-essential-armhf:native'], - ia64 => ['crossbuild-essential-ia64:native'], - mips => ['crossbuild-essential-mips:native'], - mipsel => ['crossbuild-essential-mipsel:native'], - powerpc => ['crossbuild-essential-powerpc:native'], - ppc64el => ['crossbuild-essential-ppc64el:native'], - sparc => ['crossbuild-essential-sparc:native'] - }, - HELP => 'Per-architecture dependencies required for cross-building.' + DEFAULT => {}, + HELP => 'Per-architecture dependencies required for cross-building. By default, if a Debian architecture is not found as a key in this hash, the package crossbuild-essential-${hostarch}:native will be installed.' + EXAMPLE => ' +$crossbuild_core_depends = { + nios2 => [\'crossbuild-essential-nios2:native\', \'special-package\'], + musl-linux-mips => [\'crossbuild-essential-musl-linux-mips:native\', \'super-special\'], +} +' }, 'BUILD_SOURCE' => { TYPE => 'BOOL', VARNAME => 'build_source', -- 2.5.1
signature.asc
Description: signature