[Build-common-hackers] Bug#521180: Bug#521180: cdbs: DEB_PYTHON_MODULE_PACKAGE behavior changed unexpectedly
Marc Dequènes (Duck)
duck at duckcorp.org
Fri Mar 27 13:10:19 UTC 2009
Quoting "Jonas Smedegaard" <dr at jones.dk>:
> cdbs_python_packages is indeed the replacement: In the past multiple
> packages was supported, and I have prepared for that to be supported
> again in the future, even if currently i is not possible.
That's a good idea indeed.
I think there is no other way than reverting the behavior of
DEB_PYTHON_MODULE_PACKAGE in this case. The following patch just try
to guess all the cases and define the compatible behavior when
necessary. It also warns the user in all uses of the old variable.
Could you give me your opinion ?
--- /usr/share/cdbs/1/class/python-distutils.mk.orig 2009-03-27
13:20:36.000000000 +0100
+++ /usr/share/cdbs/1/class/python-distutils.mk 2009-03-27
14:09:38.000000000 +0100
@@ -31,6 +31,16 @@
include $(_cdbs_class_path)/langcore.mk$(_cdbs_makefile_suffix)
+ifdef DEB_PYTHON_MODULE_PACKAGE
+ $(warning WARNING: Use of DEB_PYTHON_MODULE_PACKAGE is deprecated.
You can override the module list using DEB_PYTHON_MODULE_PACKAGES now.)
+ DEB_PYTHON_MODULE_PACKAGES = DEB_PYTHON_MODULE_PACKAGE
+else
+ USES_DEB_PYTHON_MODULE_PACKAGE = $(shell grep -q
"DEB_PYTHON_MODULE_PACKAGE[^S]" debian/rules && echo yes)
+ ifeq (yes, $(USES_DEB_PYTHON_MODULE_PACKAGE))
+ $(warning WARNING: Use of DEB_PYTHON_MODULE_PACKAGE is
deprecated. You can construct rules using patsubst/addprefix/firstword
and the new variable 'cdbs_python_packages')
+ DEB_PYTHON_MODULE_PACKAGE = $(firstword $(filter-out %-doc %-dev
%-common, $(DEB_PACKAGES)))
+ endif
+endif
# default package is the first one declared in 'debian/control'
# NB! override needs to be done _before_ including this file!
#DEB_PYTHON_MODULE_PACKAGE =
@@ -45,7 +55,7 @@
#DEB_PYTHON_DESTDIR = $(DEB_DESTDIR)
cdbs_python_destdir = $(or $(DEB_PYTHON_DESTDIR),$(DEB_DESTDIR))
-cdbs_python_packages = $(or $(DEB_PYTHON_MODULE_PACKAGE),$(firstword
$(filter-out %-doc %-dev %-common, $(DEB_PACKAGES))))
+cdbs_python_packages = $(or $(DEB_PYTHON_MODULE_PACKAGES),$(firstword
$(filter-out %-doc %-dev %-common, $(DEB_PACKAGES))))
cdbs_python_arch_packages = $(filter $(cdbs_python_packages),
$(DEB_ARCH_PACKAGES))
cdbs_python_indep_packages = $(filter $(cdbs_python_packages),
$(DEB_INDEP_PACKAGES))
--
Marc Dequènes (Duck)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: PGP Digital Signature
Url : http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20090327/ff66e2a3/attachment.pgp
More information about the Build-common-hackers
mailing list