From 4ebbcc72b52c6f80f16b9473037b1f5e0473a7f6 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 16 Feb 2026 16:29:18 +0100 Subject: [PATCH 1/2] Fix setting of component directories when using buildininstalldir --- easybuild/easyblocks/generic/bundle.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/generic/bundle.py b/easybuild/easyblocks/generic/bundle.py index 0af115e9d44..5cf055103c0 100644 --- a/easybuild/easyblocks/generic/bundle.py +++ b/easybuild/easyblocks/generic/bundle.py @@ -244,10 +244,6 @@ def __init__(self, *args, **kwargs): # instantiate the component to transfer further information comp_instance = comp_cfg.easyblock(comp_cfg, logfile=self.logfile) - # correct build/install dirs - comp_instance.builddir = self.builddir - comp_instance.install_subdir, comp_instance.installdir = self.install_subdir, self.installdir - # check if sanity checks are enabled for the component if self.cfg['sanity_check_all_components'] or comp_cfg['name'] in self.cfg['sanity_check_components']: self.comp_cfgs_sanity_check.append(comp_instance) @@ -282,6 +278,9 @@ def prepare_step(self, *args, **kwargs): super().prepare_step(*args, **kwargs) for _, comp in self.comp_instances: comp.toolchain.dependencies = self.toolchain.dependencies + # correct build/install dirs + comp.builddir = self.builddir + comp.install_subdir, comp.installdir = self.install_subdir, self.installdir def patch_step(self): """Patch step must be a no-op for bundle, since there are no top-level sources/patches.""" From 4764336d2311ed40ad6d3a27845ffdf0948aaf70 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 16 Feb 2026 16:34:15 +0100 Subject: [PATCH 2/2] Use post_init for setting paths --- easybuild/easyblocks/generic/bundle.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/generic/bundle.py b/easybuild/easyblocks/generic/bundle.py index 5cf055103c0..c455c8ce265 100644 --- a/easybuild/easyblocks/generic/bundle.py +++ b/easybuild/easyblocks/generic/bundle.py @@ -257,6 +257,13 @@ def __init__(self, *args, **kwargs): self.cfg['sanity_check_paths'] = self.backup_sanity_paths self.cfg['sanity_check_commands'] = self.backup_sanity_cmds + def post_init(self): + super().post_init() + for _, comp in self.comp_instances: + # correct build/install dirs after possibly changing them in parent post_init + comp.builddir = self.builddir + comp.install_subdir, comp.installdir = self.install_subdir, self.installdir + def check_checksums(self): """ Check whether a SHA256 checksum is available for all sources & patches (incl. extensions). @@ -278,9 +285,6 @@ def prepare_step(self, *args, **kwargs): super().prepare_step(*args, **kwargs) for _, comp in self.comp_instances: comp.toolchain.dependencies = self.toolchain.dependencies - # correct build/install dirs - comp.builddir = self.builddir - comp.install_subdir, comp.installdir = self.install_subdir, self.installdir def patch_step(self): """Patch step must be a no-op for bundle, since there are no top-level sources/patches."""