Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve template values when getting checksums for extensions #4727

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def collect_exts_file_info(self, fetch_files=True, verify_checksums=True):
template_values.update(template_constant_dict(ext_src))

source_urls = resolve_template(ext_options.get('source_urls', []), template_values)
checksums = ext_options.get('checksums', [])
checksums = resolve_template(ext_options.get('checksums', []), template_values)

download_instructions = resolve_template(ext_options.get('download_instructions'), template_values)

Expand Down
10 changes: 7 additions & 3 deletions test/framework/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,11 @@ def test_exts_list(self):
"checksums": [
# SHA256 checksum for source (gzip-1.4.eb)
"6a5abcab719cefa95dca4af0db0d2a9d205d68f775a33b452ec0f2b75b6a3a45",
# SHA256 checksum for 'patch' (toy-0.0.eb)
"177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad",
# SHA256 checksum for 'patch' (toy-0.0.eb);
# using dict value with key that has a template value,
# to make sure that works as expected...
{"toy-0.%(version_minor)s.eb":
"177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad"},
],
}),
# Can use templates in name and version
Expand All @@ -519,7 +522,8 @@ def test_exts_list(self):
self.assertEqual(exts_sources[1]['version'], '2.0')
self.assertEqual(exts_sources[1]['options'], {
'checksums': ['6a5abcab719cefa95dca4af0db0d2a9d205d68f775a33b452ec0f2b75b6a3a45',
'177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad'],
{'toy-0.%(version_minor)s.eb':
'177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad'}],
'patches': [('toy-0.0.eb', '.')],
'source_tmpl': 'gzip-1.4.eb',
'source_urls': [('http://example.com', 'suffix')],
Expand Down
Loading