Skip to content
Merged
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
7 changes: 6 additions & 1 deletion easybuild/easyblocks/generic/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def __init__(self, *args, **kwargs):
# list of sources for bundle itself *must* be empty
if self.cfg['sources']:
raise EasyBuildError("List of sources for bundle itself must be empty, found %s", self.cfg['sources'])
if self.cfg['patches']:
raise EasyBuildError("List of patches for bundle itself must be empty, found %s", self.cfg['patches'])

# disable templating to avoid premature resolving of template values
self.cfg.enable_templating = False
Expand Down Expand Up @@ -109,7 +111,7 @@ def __init__(self, *args, **kwargs):
comp_cfg['easyblock'] = None

# reset list of sources/source_urls/checksums
comp_cfg['sources'] = comp_cfg['source_urls'] = comp_cfg['checksums'] = []
comp_cfg['sources'] = comp_cfg['source_urls'] = comp_cfg['checksums'] = comp_cfg['patches'] = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a serious bug. It sets all of them to the same list! So if you do comp_cfg['sources'].append('foo') it will also append it to the others unless some copy trickery is done


for key in self.cfg['default_component_specs']:
comp_cfg[key] = self.cfg['default_component_specs'][key]
Expand Down Expand Up @@ -151,6 +153,9 @@ def __init__(self, *args, **kwargs):
# add per-component checksums for patches to list of checksums for patches
checksums_patches.extend(comp_cfg['checksums'][src_cnt:])

if comp_cfg['patches']:
self.cfg.update('patches', comp_cfg['patches'])

self.comp_cfgs.append(comp_cfg)

self.cfg.update('checksums', checksums_patches)
Expand Down