This repository was archived by the owner on Dec 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Add support for python patching #1
Open
klaussfreire
wants to merge
4
commits into
torian:master
Choose a base branch
from
jampp:python_patches
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably change a few things here, to improve a bit on idempotency.
get_urlmodule, and iterate along the patches urls. Register successful downloadsinstead of
cd ...3. Using the
registervar fromget_urlapply 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_urlidempotency.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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