@@ -96,6 +96,11 @@ def __init__(self, *args, **kwargs):
9696 # disable templating to avoid premature resolving of template values
9797 # Note that self.cfg.update also resolves templates!
9898 with self .cfg .disable_templating ():
99+ # Clear current top-level checksums (can only be of postinstall patches)
100+ # to append later on to component patches
101+ orig_checksums = self .cfg ['checksums' ]
102+ self .cfg ['checksums' ] = []
103+
99104 # list of checksums for patches (must be included after checksums for sources)
100105 checksums_patches = []
101106
@@ -172,7 +177,8 @@ def __init__(self, *args, **kwargs):
172177 comp_cfg ['easyblock' ] = None
173178
174179 # reset list of sources/source_urls/checksums
175- comp_cfg ['sources' ] = comp_cfg ['source_urls' ] = comp_cfg ['checksums' ] = comp_cfg ['patches' ] = []
180+ comp_cfg ['sources' ] = comp_cfg ['source_urls' ] = comp_cfg ['checksums' ] = []
181+ comp_cfg ['patches' ] = comp_cfg ['postinstallpatches' ] = []
176182
177183 for key in self .cfg ['default_component_specs' ]:
178184 comp_cfg [key ] = self .cfg ['default_component_specs' ][key ]
@@ -218,12 +224,15 @@ def __init__(self, *args, **kwargs):
218224
219225 with comp_cfg .allow_unresolved_templates ():
220226 comp_patches = comp_cfg ['patches' ]
227+ comp_postinstall_patches = comp_cfg ['postinstallpatches' ]
221228 if comp_patches :
222229 self .cfg .update ('patches' , comp_patches )
230+ # Patch step is skipped so adding postinstall patches of components here is harmless
231+ self .cfg .update ('patches' , comp_postinstall_patches )
223232
224233 self .comp_instances .append ((comp_cfg , comp_cfg .easyblock (comp_cfg , logfile = self .logfile )))
225234
226- self .cfg .update ('checksums' , checksums_patches )
235+ self .cfg .update ('checksums' , checksums_patches + orig_checksums )
227236
228237 # restore general sanity checks if using component-specific sanity checks
229238 if self .cfg ['sanity_check_components' ] or self .cfg ['sanity_check_all_components' ]:
0 commit comments