[Build-common-hackers] Bug#712729: The fix for this breaks other packages

Felipe Sateler fsateler at debian.org
Sat Oct 11 04:54:08 UTC 2014


On Tue, 9 Sep 2014 10:41:50 -0300 Felipe Sateler <fsateler at debian.org> wrote:
> On Tue, Sep 9, 2014 at 10:24 AM, Simon Ruderich <simon at ruderich.org> wrote:
> > On Mon, Sep 08, 2014 at 11:30:48PM -0300, Felipe Sateler wrote:
> >> Could you propose a patch filtering out the characters plus (+), minus
> >> (-) signs, and periods (.)?
> >
> > Sure, revised patch is attached.
>
> Great!
>
> Jonas, what do you think? Could you apply this patch please?
> Packages are getting built without the correct flags due to this bug,
> so an upload soon would be great.
>

I have uploaded a NMU to delayed/0. This bug has gone too long
unfixed. Attached is the debdiff for the NMU.

-- 

Saludos,
Felipe Sateler
-------------- next part --------------
diff -Nru cdbs-0.4.126/1/class/langcore.mk.in cdbs-0.4.126+nmu1/1/class/langcore.mk.in
--- cdbs-0.4.126/1/class/langcore.mk.in	2014-08-21 14:44:42.000000000 -0400
+++ cdbs-0.4.126+nmu1/1/class/langcore.mk.in	2014-10-11 01:38:51.000000000 -0300
@@ -24,12 +24,21 @@
 
 # Resolve our defaults
 ifneq (,$(wildcard /usr/bin/dpkg-buildflags))
+# $(filter-out %x%,...) doesn't work ...
+_filter_out = $(foreach v,$(2),$(if $(findstring $(1),$(v)),,$(v)))
 # GNU Make doesn't export current environment in $(shell ..) function.
 # We need at least some of the DEB_* flags for dpkg-buildflags, so
 # extract them from the defined variables.  Sadly there seems to be no
 # way to get just get all exported variables.
+#
+# Make variables containing the characters "+ - ." need to be filtered out as
+# they can't be exported as shell variables, see #712729.
 _get_dpkg_buildflags = $(shell \
-	$(foreach flag,$(filter DEB_%,$(.VARIABLES)),\
+	$(foreach flag,\
+			$(call _filter_out,+,\
+			$(call _filter_out,-,\
+			$(call _filter_out,.,\
+			$(filter DEB_%,$(.VARIABLES))))),\
 		$(flag)="$($(flag))") \
 	dpkg-buildflags --get $(1))
 deb_cflags := $(call _get_dpkg_buildflags,CFLAGS)
diff -Nru cdbs-0.4.126/debian/changelog cdbs-0.4.126+nmu1/debian/changelog
--- cdbs-0.4.126/debian/changelog	2014-08-21 17:07:12.000000000 -0400
+++ cdbs-0.4.126+nmu1/debian/changelog	2014-10-11 01:41:45.000000000 -0300
@@ -1,3 +1,11 @@
+cdbs (0.4.126+nmu1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Unbreak dpkg-buildflags call. Thanks to Simon Ruderich for the updated
+    patch. Closes: bug#712729.
+
+ -- Felipe Sateler <fsateler at debian.org>  Sat, 11 Oct 2014 01:41:44 -0300
+
 cdbs (0.4.126) unstable; urgency=medium
 
   [ Jonas Smedegaard ]


More information about the Build-common-hackers mailing list