Re: [PATCH] Add new variables, DEB_HOST_MULTIARCH and DEB_BUILD_MULTIARCH
On Wed, 2011-03-09 at 11:43:05 -0800, Steve Langasek wrote:
> For my part I don't yet see a consensus around a single triplet that armhf
> will be able to use as both GNU triplet and multiarch triplet, so I think
> there's still a possibility that armhf will need to be added here as well;
> but we can certainly cross that bridge when we come to it, as armhf support
> hasn't yet landed in dpkg at all.
Sure.
> Can this patch be queued for dpkg 1.16.0? It would be good to have this
> land in the archive ASAP, so that we can start patching the other libraries
> (dpkg multi-arch: same support is not a prerequisite for that).
Yes, as mentioned on IRC, alrady queueued for my next push. Thanks!
> dpkg (1.15.8.10) unstable; urgency=low
> diff --git a/man/dpkg-architecture.1 b/man/dpkg-architecture.1
> index 4ca309e..3176d1b 100644
> --- a/man/dpkg-architecture.1
> +++ b/man/dpkg-architecture.1
> @@ -131,6 +134,9 @@ The \s-1CPU\s0 part of \s-1DEB_HOST_GNU_TYPE\s0.
> The System part of \s-1DEB_HOST_GNU_TYPE\s0.
> .IP "\s-1DEB_HOST_GNU_TYPE\s0" 4
> The \s-1GNU\s0 system type of the host machine.
> +.IP "\s-1DEB_BUILD_MULTIARCH\s0" 4
Fixed this to read DEB_HOST_MULTIARCH.
> diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
> index da72345..df02ace 100644
> --- a/scripts/Dpkg/Arch.pm
> +++ b/scripts/Dpkg/Arch.pm
> @@ -237,6 +238,25 @@ sub gnutriplet_to_debtriplet($)
> return (split(/-/, $os, 2), $cpu);
> }
>
> +sub gnutriplet_to_multiarch($)
> +{
> + my ($gnu) = @_;
> + my ($cpu,$cdr) = split('-',$gnu,2);
> +
> + if ($cpu =~ /^i[456]86$/) {
> + return "i386-$cdr";
> + } else {
> + return $gnu;
> + }
> +}
And sprinkled some spaces around there.
regards,
guillem
Reply to: