[Build-common-hackers] Bug#521180: Bug#521180: cdbs: DEB_PYTHON_MODULE_PACKAGE behavior changed unexpectedly

Jonas Smedegaard dr at jones.dk
Fri Mar 27 14:35:35 UTC 2009

On Fri, Mar 27, 2009 at 02:10:19PM +0100, Marc Dequènes (Duck) wrote:
> 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 ?


It is generally bad to use ifdef, because it is resolved early, 
requiring overrides to be done _before_ including the snippet.

In this particular case the damage was done already: 
DEB_PYTHON_MODULE_PACKAGE was not redefinable at all (read my commit 
messages for the full analysis).  But still we should avoid using ifdef 
whenever possible.

...and I believe it is possible to avoid here :-)


Declaring a variable is bad too, as it requires overriding _after_ 
including the snippet.

> +  USES_DEB_PYTHON_MODULE_PACKAGE = $(shell grep -q  
> "DEB_PYTHON_MODULE_PACKAGE[^S]" debian/rules && echo yes)

Arrgh. Using shell constructs either slows down resolving and is 
unnecessary here, I believe.

Have a look at my proposed patches (attached).

They are completely untested. Testing is much appreciated.

  - Jonas

* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deprecate.patch
Type: text/x-diff
Size: 1480 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20090327/daa5f0fe/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plural.patch
Type: text/x-diff
Size: 1341 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20090327/daa5f0fe/attachment-0001.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20090327/daa5f0fe/attachment.pgp 

More information about the Build-common-hackers mailing list