From c01fec185d37eb22e2d2f66fdc4e1c9ae681213e Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Thu, 21 May 2026 15:57:18 +0200 Subject: [PATCH 1/2] Add check for the existence of the EESSI_SITE_SOFTWARE_PATH. This is needed if we make this location configurable thourhg EESSI_SITE_SOFTWARE_PREFIX as is done in https://github.com/EESSI/software-layer-scripts/pull/232 --- EESSI-extend-easybuild.eb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index 4658d2a8..1463144f 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -143,9 +143,17 @@ elseif eessi_site_install then LmodError("You cannot use EESSI_SITE_INSTALL in combination with any other EESSI_*_INSTALL environment variables") end easybuild_installpath = os.getenv("EESSI_SITE_SOFTWARE_PATH") - -- enforce accelerator subdirectory usage for site installs (only if an accelerator install is requested) + -- Check that the plain EESSI_SITE_SOFTWARE_PATH exists + if not isDir(easybuild_installpath) then + LmodError("The location of EESSI_SITE_SOFTWARE_PATH (" .. easybuild_installdir .. ") does not exist or is not a folder") + end + -- enforce accelerator subdirectory usage for site installs (only if an accelerator install is requested) if (eessi_accelerator_target ~= nil) and (cuda_compute_capability ~= nil) and (os.getenv("EESSI_ACCELERATOR_INSTALL") ~= nil) then easybuild_installpath = pathJoin(easybuild_installpath, eessi_accelerator_target) + -- Check that the EESSI_SITE_SOFTWARE_PATH with eessi_accelerator_target prefix exists + if not isDir(easybuild_installpath) then + LmodError("The easybuild install directory (" .. easybuild_installdir ..") does not exist or is not a folder") + end end else -- Deal with user and project installs From 85977e393015aedaf0aa6a133e077f9758c35fd2 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Mon, 25 May 2026 10:12:22 +0200 Subject: [PATCH 2/2] Use correct variable name in LmodError --- EESSI-extend-easybuild.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index 1463144f..01a0d36b 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -145,14 +145,14 @@ elseif eessi_site_install then easybuild_installpath = os.getenv("EESSI_SITE_SOFTWARE_PATH") -- Check that the plain EESSI_SITE_SOFTWARE_PATH exists if not isDir(easybuild_installpath) then - LmodError("The location of EESSI_SITE_SOFTWARE_PATH (" .. easybuild_installdir .. ") does not exist or is not a folder") + LmodError("The location of EESSI_SITE_SOFTWARE_PATH (" .. easybuild_installpath .. ") does not exist or is not a folder") end -- enforce accelerator subdirectory usage for site installs (only if an accelerator install is requested) if (eessi_accelerator_target ~= nil) and (cuda_compute_capability ~= nil) and (os.getenv("EESSI_ACCELERATOR_INSTALL") ~= nil) then easybuild_installpath = pathJoin(easybuild_installpath, eessi_accelerator_target) -- Check that the EESSI_SITE_SOFTWARE_PATH with eessi_accelerator_target prefix exists if not isDir(easybuild_installpath) then - LmodError("The easybuild install directory (" .. easybuild_installdir ..") does not exist or is not a folder") + LmodError("The easybuild install directory (" .. easybuild_installpath ..") does not exist or is not a folder") end end else