[Build-common-hackers] Bug#525436: cdbs: distutils does not call setup.py install any more

Jonas Smedegaard dr at jones.dk
Sat Apr 25 07:36:44 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

package cdbs
retitle 525436 distutils calls setup.py install later than earlier
thanks

On Fri, Apr 24, 2009 at 06:07:46PM +0200, Martin Pitt wrote:
>I now bisected this to svn r341 [1]. All previous versions work, all 
>future versions fail.
>
>However, I'm afraid I need to blow some dust off my Make fu to even 
>fully understand that change. Jonas, any idea what broke here?

Right, that's where it broke.  And I am to blame for that :-(

That commit switched from using the earlier package-independent 
common-install-* targets to the slightly later package-dependent 
install/* targets.

My change did not take into account packages relying on python 
installation being finished at the time of install/* targets.

In other words, the problem is not that python install rule does no 
longer get invoked, but that it now gets invoked in parallel (or in 
undefined order of) other install/* rules.

Concretely for calibre, it seems to me that the install/* target is 
being abused for non-install routine (it is cleanup of other installs, 
not additional - independent - install).  I believe it would be better 
for that package to _depend_ on install rule instead _be_ one.  Like 
this:

install/calibre:: calibre-fixup
calibre-fixup:
	rm -r ...

Still, from the perspective of this CDBS backwards-compatibility bug, 
above is only a workaround, not "calibre approach is wrong".


I really want to keep the CDBS change (i.e. not revert r341) but 
acknowledge that backwards-compatibility needs to be improved somehow.  
As I wrote in the commit message, the change both cleans up some ugly 
restrictions (use of ifeq) and paves the way for future improvements:

> Use package-specific build targets and avoid ifeq constructs.
> 
> ifeq constructs are evil: They are resolved early, so any variables 
> used needs to be declared _before_.  CDBS snippets should ideally 
> allow options declared either before or after including the snippets.
> 
> This change gets rid of some of some needless ifeq constructs.
> 
> Also, the replacement build targets are carefully constructed to use 
> trailing binary package names, so $(cdbs_curdir) is properly expanded, 
> so allows per-package customized options.


Kind regards,

 - Jonas

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

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAknyvYwACgkQn7DbMsAkQLi+pACfZzbIFo/oWqx9FgObVQ2PeKS2
WmsAn26Tfm/6pFIxkQSHMBf4sulFAk41
=+d7u
-----END PGP SIGNATURE-----





More information about the Build-common-hackers mailing list