Skip to content

Commit c999fe4

Browse files
authored
Merge pull request #4727 from boegel/resolve_template_extensio_checksums
resolve template values when getting checksums for extensions
2 parents 2281945 + 2755f65 commit c999fe4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

easybuild/framework/easyblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def collect_exts_file_info(self, fetch_files=True, verify_checksums=True):
614614
template_values.update(template_constant_dict(ext_src))
615615

616616
source_urls = resolve_template(ext_options.get('source_urls', []), template_values)
617-
checksums = ext_options.get('checksums', [])
617+
checksums = resolve_template(ext_options.get('checksums', []), template_values)
618618

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

test/framework/easyconfig.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,11 @@ def test_exts_list(self):
494494
"checksums": [
495495
# SHA256 checksum for source (gzip-1.4.eb)
496496
"6a5abcab719cefa95dca4af0db0d2a9d205d68f775a33b452ec0f2b75b6a3a45",
497-
# SHA256 checksum for 'patch' (toy-0.0.eb)
498-
"177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad",
497+
# SHA256 checksum for 'patch' (toy-0.0.eb);
498+
# using dict value with key that has a template value,
499+
# to make sure that works as expected...
500+
{"toy-0.%(version_minor)s.eb":
501+
"177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad"},
499502
],
500503
}),
501504
# Can use templates in name and version
@@ -519,7 +522,8 @@ def test_exts_list(self):
519522
self.assertEqual(exts_sources[1]['version'], '2.0')
520523
self.assertEqual(exts_sources[1]['options'], {
521524
'checksums': ['6a5abcab719cefa95dca4af0db0d2a9d205d68f775a33b452ec0f2b75b6a3a45',
522-
'177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad'],
525+
{'toy-0.%(version_minor)s.eb':
526+
'177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad'}],
523527
'patches': [('toy-0.0.eb', '.')],
524528
'source_tmpl': 'gzip-1.4.eb',
525529
'source_urls': [('http://example.com', 'suffix')],

0 commit comments

Comments
 (0)