Add support for python patching#1
Conversation
| src="{{python_src_prefix}}/{{python_src_pkg}}" | ||
| dest="{{python_src_prefix}}" | ||
|
|
||
| - name: Patch code |
There was a problem hiding this comment.
I'd probably change a few things here, to improve a bit on idempotency.
- use the
get_urlmodule, and iterate along the patches urls. Register successful downloads - Use:
args:
chdir: "{{python_src_prefix}}"
instead of cd ...
3. Using the register var from get_url apply the patche.
4. Not sure about removing the patches. IMO it is a good idea to actually know what has been applied, and also, that would break get_url idempotency.
There was a problem hiding this comment.
sha1 checksum checking for get_url is only there for ansible 2.0 and above. Prior versions support only the sha256sum argument, which is deprecated on 2.0, so maintaining cross compatibility becomes very cumbersome.
Idempotence is already broken since get_url in the previous step is currently unconditional (when is commented), unarchive is unconditional as well, and the build is currently conditional only on python not being installed (so it won't pick up changes in source code even if all the above tasks actually report changed or not correctly).
You can never fully ascertain which patches were applied also, there's no way to know whether a binary was built with or without a patch. So even if the patches were left on the source path, that still doesn't guarantee they were built into the binary. So preserving idempotence in the presence of patches seems like a tall order.
The other changes don't seem like a big deal
|
This is a good one to have 👍 |
No description provided.