Bug#881646: don't build multilib library packages in stage1

2017-11-13 Thread YunQiang Su
Control: merge 881454 881646

On Mon, 13 Nov 2017 21:37:57 +0100 Matthias Klose  wrote:
> Package: src:glibc
> Version: 2.24-17
> Severity: important
> Tags: patch
>
> The recent debhelper changes expose a bug building stage1, because glibc build
> the multilib library packages in stage1, which shouldn't be built (only all 
> dev
> packages should be built).
>

Hi,Matthias,
I don't think disabling multilib is not required for stage1.
Disabling shared-library should be enough.

See: #881454

>



Bug#881646: don't build multilib library packages in stage1

2017-11-13 Thread Matthias Klose
Package: src:glibc
Version: 2.24-17
Severity: important
Tags: patch

The recent debhelper changes expose a bug building stage1, because glibc build
the multilib library packages in stage1, which shouldn't be built (only all dev
packages should be built).


--- glibc-2.24/debian/rules~	2017-08-26 11:03:41.0 +0200
+++ glibc-2.24/debian/rules	2017-11-13 21:26:07.428822436 +0100
@@ -164,8 +164,12 @@
 -include debian/sysdeps/$(DEB_HOST_ARCH).mk
 
 ifeq ($(filter nobiarch,$(DEB_BUILD_PROFILES)),)
-GLIBC_PASSES += $(GLIBC_MULTILIB_PASSES)
-DEB_ARCH_REGULAR_PACKAGES += $(DEB_ARCH_MULTILIB_PACKAGES)
+  GLIBC_PASSES += $(GLIBC_MULTILIB_PASSES)
+  ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
+DEB_ARCH_REGULAR_PACKAGES += $(foreach p,$(DEB_ARCH_MULTILIB_PACKAGES), $(if $(findstring -dev,$(p)), $(p)))
+  else
+DEB_ARCH_REGULAR_PACKAGES += $(DEB_ARCH_MULTILIB_PACKAGES)
+  endif
 endif
 
 # Don't run dh_strip on this package