@@ -108,6 +108,11 @@ def __init__(self, *args, **kwargs):
108108 # disable templating to avoid premature resolving of template values
109109 # Note that self.cfg.update also resolves templates!
110110 with self .cfg .disable_templating ():
111+ # Clear current top-level checksums (can only be of postinstall patches)
112+ # to append later on to component patches
113+ orig_checksums = self .cfg ['checksums' ]
114+ self .cfg ['checksums' ] = []
115+
111116 # list of checksums for patches (must be included after checksums for sources)
112117 checksums_patches = []
113118
@@ -230,12 +235,15 @@ def __init__(self, *args, **kwargs):
230235
231236 with comp_cfg .allow_unresolved_templates ():
232237 comp_patches = comp_cfg ['patches' ]
238+ comp_postinstall_patches = comp_cfg ['postinstallpatches' ]
233239 if comp_patches :
234240 self .cfg .update ('patches' , comp_patches )
241+ # Patch step is skipped so adding postinstall patches of components here is harmless
242+ self .cfg .update ('patches' , comp_postinstall_patches )
235243
236244 self .comp_instances .append ((comp_cfg , comp_cfg .easyblock (comp_cfg , logfile = self .logfile )))
237245
238- self .cfg .update ('checksums' , checksums_patches )
246+ self .cfg .update ('checksums' , checksums_patches + orig_checksums )
239247
240248 # restore general sanity checks if using component-specific sanity checks
241249 if self .cfg ['sanity_check_components' ] or self .cfg ['sanity_check_all_components' ]:
0 commit comments