diff --git a/easybuild/easyblocks/generic/bundle.py b/easybuild/easyblocks/generic/bundle.py index a867fde5979..19efc0678da 100644 --- a/easybuild/easyblocks/generic/bundle.py +++ b/easybuild/easyblocks/generic/bundle.py @@ -108,6 +108,11 @@ def __init__(self, *args, **kwargs): # disable templating to avoid premature resolving of template values # Note that self.cfg.update also resolves templates! with self.cfg.disable_templating(): + # Clear current top-level checksums (can only be of postinstall patches) + # to append later on to component patches + orig_checksums = self.cfg['checksums'] + self.cfg['checksums'] = [] + # list of checksums for patches (must be included after checksums for sources) checksums_patches = [] @@ -230,12 +235,15 @@ def __init__(self, *args, **kwargs): with comp_cfg.allow_unresolved_templates(): comp_patches = comp_cfg['patches'] + comp_postinstall_patches = comp_cfg['postinstallpatches'] if comp_patches: self.cfg.update('patches', comp_patches) + # Patch step is skipped so adding postinstall patches of components here is harmless + self.cfg.update('patches', comp_postinstall_patches) self.comp_instances.append((comp_cfg, comp_cfg.easyblock(comp_cfg, logfile=self.logfile))) - self.cfg.update('checksums', checksums_patches) + self.cfg.update('checksums', checksums_patches + orig_checksums) # restore general sanity checks if using component-specific sanity checks if self.cfg['sanity_check_components'] or self.cfg['sanity_check_all_components']: