Package: dpkg-dev
Tags: patch

The dpkg-architecture(1) manpage claims that architecture.mk "sets and
exports all the variables" but in practice this isn't the case. Here's a
change that fixes that [1]:

> diff --git a/scripts/mk/architecture.mk b/scripts/mk/architecture.mk
> index 8520c5b..0af9601 100644
> --- a/scripts/mk/architecture.mk
> +++ b/scripts/mk/architecture.mk
> @@ -4,7 +4,7 @@
>  
>  dpkg_lazy_eval ?= $$(or $$(value DPKG_CACHE_$(1)),$$(eval DPKG_CACHE_$(1) := 
> $$(shell $(2)))$$(value DPKG_CACHE_$(1)))
>  
> -dpkg_architecture_setvar = $(1) ?= $(call 
> dpkg_lazy_eval,$(1),dpkg-architecture -q$(1))
> +dpkg_architecture_setvar = export $(1) ?= $(call 
> dpkg_lazy_eval,$(1),dpkg-architecture -q$(1))
>  
>  $(foreach machine,BUILD HOST TARGET,\
>    $(foreach var,ARCH ARCH_ABI ARCH_LIBC ARCH_OS ARCH_CPU ARCH_BITS 
> ARCH_ENDIAN GNU_CPU GNU_SYSTEM GNU_TYPE MULTIARCH,\

It would be nice if these variables were exported, since I'm using
$DEB_HOST_GNU_CPU in a script called from Make. Except for exporting
these variables, no other behavior is changed.

[1] 
https://salsa.debian.org/nottheoilrig-guest/dpkg/commit/1d1cd0a5f1dc11dc27c4423c1ca5f07eb4782a3d

Reply via email to