Fix check_checksums
when using templates, patch-dicts or checksums.json
#5021
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 is a similar fix as easybuilders/easybuild-easyconfigs#15973
check_checksums
had various shortcomings, some touched by 7112e40 (from @boegel ) which disabled templating entirely when getting theexts_list
list.This breaks when
checksums.json
is used: It will report missing checksums even when they are available in the checksums.jsonAdditionally templates in the name/version of extension won't be resolved causing the error message harder to understand
A quick fix was to replace the above commit by
allow_unresolved_templates
-decorator to allow partially resolved extensions but don't fail as before when templates are used e.g. ininstall_cmd
which fixes the issues with the name/version of the extensionHowever that resolves too deep as inside the extension options different template values must be used.
We have
collect_exts_file_info
which does handle all those peculiarities of the extension specs already so just use that.This also handles the default file name of extension sources and
nosource
which we can rely on here if it fillssources
correctly. This requires #4054 (merged here so that tests pass)It also fixes a failure when patches were specified as dicts as In
sources
the keyname is "filename" while inpatches
it is "name" which causes aKeyError
incheck_checksums_for