Skip to content

Commit 725dbbf

Browse files
committed
determine and export software layer version suffix
1 parent dae1ac8 commit 725dbbf

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

init/modules/EESSI/2023.06.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@ local eessi_repo = "/cvmfs/software.eessi.io"
1616
local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version)
1717
local eessi_compat_prefix = pathJoin(eessi_prefix, "compat")
1818
local eessi_init_prefix = pathJoin(eessi_prefix, "init")
19+
local eessi_software_layer_version_suffix = ""
1920
local eessi_os_type = "linux"
2021
-- for RISC-V clients we need to do some overrides, as things are stored in different CVMFS repositories
2122
if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then
2223
if (eessi_version == "2023.06" or eessi_version == "20240402") then
23-
eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402"
24+
eessi_version_override = os.getenv("EESSI_VERSION_OVERRIDE") or ""
25+
i_suffix = string.find(eessi_version_override, '-')
26+
if i_suffix then
27+
eessi_software_layer_version_suffix = string.sub(eessi_version_override, i_suffix)
28+
end
2429
eessi_repo = "/cvmfs/riscv.eessi.io"
25-
eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version)
30+
eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version .. eessi_software_layer_version_suffix)
2631
eessi_compat_prefix = pathJoin(eessi_prefix, "compat")
2732
if mode() == "load" then
2833
LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" ..
@@ -139,6 +144,8 @@ prepend_path("PATH", pathJoin(eessi_eprefix, "bin"))
139144
eessiDebug("Adding " .. pathJoin(eessi_eprefix, "bin") .. " to PATH")
140145
prepend_path("PATH", pathJoin(eessi_eprefix, "usr", "bin"))
141146
eessiDebug("Adding " .. pathJoin(eessi_eprefix, "usr", "bin") .. " to PATH")
147+
setenv("EESSI_SOFTWARE_LAYER_VERSION_SUFFIX", eessi_software_layer_version_suffix)
148+
eessiDebug("Setting EESSI_SOFTWARE_LAYER_VERSION_SUFFIX to " .. eessi_software_layer_version_suffix)
142149
setenv("EESSI_SOFTWARE_PATH", eessi_software_path)
143150
eessiDebug("Setting EESSI_SOFTWARE_PATH to " .. eessi_software_path)
144151
setenv("EESSI_MODULEPATH", eessi_module_path)

0 commit comments

Comments
 (0)