From 68c61f44ca2b72720423064534c950688424685e Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 12 Oct 2025 21:36:44 +0200 Subject: [PATCH] fix 'module show' issue and use default EESSI version dependent on initialized EESSI version --- EESSI-extend-easybuild.eb | 9 ++++++--- ...eb-5.1.2-EESSI-extend-fix-conditional-and-version.yml | 7 +++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 easystacks/software.eessi.io/2025.06/rebuilds/20251012-eb-5.1.2-EESSI-extend-fix-conditional-and-version.yml diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index 85113e84..4ce90a80 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -81,7 +81,7 @@ modextravars = { # EASYBUILD_GROUP_WRITABLE_INSTALLDIR # EASYBUILD_UMASK # EASYBUILD_STICKY_BIT -modluafooter = """ +local_modluafooter = """ if (mode() == "load") then -- Use a working directory for temporary build files if (os.getenv("WORKING_DIR") == nil) then @@ -215,14 +215,15 @@ if not ( isloaded("EasyBuild") ) then load(latest("EasyBuild")) end easybuild_version = os.getenv("EBVERSIONEASYBUILD") or easybuild_version -eessi_version = os.getenv("EESSI_VERSION") or "2023.06" +eessi_version = os.getenv("EESSI_VERSION") or "{_template_version}" -- Set environment variables that are EasyBuild version specific -- Do unload unconditionally, so that even if EB versions were switched in the meantime, this gets unset -- This avoids issues where EESSI-extend is first loaded with EB => 5.1 (which set these vars) -- but then EB is swapped for a version < 5.1 and then EESSI-extend is unloaded (which would not unset -- these vars if we did it conditional on the EB version) -if mode() == "unload" or mode() == "dependencyCk" or convertToCanonical(easybuild_version) >= convertToCanonical("5.1") then +if mode() == "unload" or mode() == "dependencyCk" or + ( easybuild_version ~= nil and convertToCanonical(easybuild_version) >= convertToCanonical("5.1") ) then setenv ("EASYBUILD_STRICT_RPATH_SANITY_CHECK", "1") setenv ("EASYBUILD_CUDA_SANITY_CHECK_ERROR_ON_FAILED_CHECKS", "1") setenv ("EASYBUILD_FAIL_ON_MOD_FILES_GCCCORE", "1") @@ -236,4 +237,6 @@ if mode() == "unload" or mode() == "dependencyCk" or convertToCanonical(easybuil end """ +modluafooter = local_modluafooter.format(_template_version=version) + moduleclass = 'devel' diff --git a/easystacks/software.eessi.io/2025.06/rebuilds/20251012-eb-5.1.2-EESSI-extend-fix-conditional-and-version.yml b/easystacks/software.eessi.io/2025.06/rebuilds/20251012-eb-5.1.2-EESSI-extend-fix-conditional-and-version.yml new file mode 100644 index 00000000..cb034d4a --- /dev/null +++ b/easystacks/software.eessi.io/2025.06/rebuilds/20251012-eb-5.1.2-EESSI-extend-fix-conditional-and-version.yml @@ -0,0 +1,7 @@ +# 2025-10-12 +# Running 'module show EESSI-extend/2025.06-easybuild' throws an error. It seems +# 'easybuild_version' is nil and therefore an conditional expression cannot be +# evaluated. Also, it seems not correct that the eessi_version is set to +# "2023.06" if the environment variable EESSI_VERSION is not set. +easyconfigs: + - EESSI-extend-easybuild.eb