[Build-common-hackers] Bug#414305: Bug#414305: patch/unpatch, update-config/reverse-config, etc

Jonas Smedegaard dr at jones.dk
Wed May 20 21:05:57 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Wed, May 20, 2009 at 09:18:28AM +0200, Raúl Sánchez Siles wrote:
>  Hello
>
>El Martes 19 Mayo 2009, Robert Millan escribió:
>> I remember struggling with this problem and it took me a while to 
>> control all the corner cases.  Before considering a patch for this 
>> problem suitable, please check, at least:
>>
>>   - My changelog entry for cdbs 0.4.26-4
>>
>>   - #299010

>  Meanwhile I think the smarter solution would be prepending the 
>reverse- patches stuff to the cleanbuilddir (as oposed to current 
>appending). I can't figure out any good way of doing this.

buildcore.mk contains these:

post-patches:: pre-build apply-patches update-config

common-configure-arch:: post-patches
common-configure-indep:: post-patches

...which means patches by default (i.e. if no other rules explicitly 
declare iterdependency!) are applied before configuring.

autotools-files.mk contains this:

common-configure-arch common-configure-indep:: debian/stamp-autotools-files
debian/stamp-autotools-files:

...which only means autogeneration should be finished before configuring 
- - it does not say if it should happen before or after applying patches!

You might be lucky that order does not matter, but if patches affect 
autogeneration or vice versa, then the safe approach is to explicitly 
declare the needed order of those rules.  Not the order of CDBS 
snippets, but of the rules!



Adding the following to your rules file should force patching then 
autogenerating:

debian/stamp-autotools-files: apply-patches

The following, on the other hand, should force autogenerating then 
patching:

apply-patches: debian/stamp-autotools-files

...and both of above should make order of CDBS snippets irrelevant!



Similarly, to unpatch before reverting override of autogenerated files:

reverse-config: reverse-patches

And to unpatch after auto* cleanup:

reverse-patches: reverse-config



Above is pure theory - please test if it holds any truth.

  - 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)

iEYEAREDAAYFAkoUcLUACgkQn7DbMsAkQLhnXwCeOWD35K/yq5DU3wOv20tBr3Ma
zK4An1vpEfe5ZhL/7KprnJHboSQ0vHi9
=7Dao
-----END PGP SIGNATURE-----





More information about the Build-common-hackers mailing list