store all patches (incl the ones for extensions) that need to be copied to a repo/reprod dir in an all_patches set#4960
Merged
ocaisa merged 5 commits intoeasybuilders:developfrom Jul 11, 2025
Conversation
ocaisa
previously approved these changes
Jul 11, 2025
Member
ocaisa
left a comment
There was a problem hiding this comment.
This looks very clean now, if the existing tests (https://github.com/easybuilders/easybuild-framework/blob/develop/test/framework/toy_build.py#L1390) pass I think this is good to go
all_patches variable to store all patches (incl the ones for extensions) that need to be copied to a repo/reprod dirall_patches set
all_patches setall_patches set
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This also solves the duplication issue that #4959 tried to solve, which may cause issues for anyone trying to install an easyconfig that has an extension with a patch, and when that patch has read-only file permissions (this may happen frequently if EasyBuild itself was installed with
--read-only-installdir).Note that patches of components are added to
self.patchesby the Bundle easyblock: https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/generic/bundle.py#L222. Hence, they will also be included inself.all_patches.Do note that, regardless of the change in this PR, the approach used by the Bundle may actually cause issues, because sources/patches may then be expected by the main easyblock itself, and they may also end up in the easyconfig stored in the
reprodfolder (see #4862). However, I felt that solving that was out of scope for this PR, and could be handled in a follow-up PR.edit: discussed this a bit more with @ocaisa on Slack, and converted
all_patchesinto a set containing FrozenDicts. This prevents that duplicate entries may show up in the list, i.e. it would prevent that due to future code changes the same issue as #4959 would pop up again. When I tried to use FrozenDicts, I got this error:Solved this by changing
self.iteritems()toself.items().edit2: we actually only need to know the paths to all patches, so let's only store those instead of the entire patch_info dictionary.