|
123 | 123 | local refer_to_docs = "For more information on how to do this, see https://www.eessi.io/docs/site_specific_config/gpu/.\\n" |
124 | 124 | if packagesList[simpleName] then |
125 | 125 | -- simpleName is a module in packagesList |
126 | | - -- get the full host_injections path |
127 | | - local hostInjections = string.gsub(os.getenv('EESSI_SOFTWARE_PATH') or "", 'versions', 'host_injections') |
| 126 | + -- first, check the old host_injections path. If that exists, print a more targetted, explainatory warning |
| 127 | + local previousHostInjections = string.gsub(os.getenv('EESSI_SOFTWARE_PATH') or "", 'versions', 'host_injections') |
| 128 | + local previousPackageEasyBuildDir = hostInjections .. "/software/" .. t.modFullName .. "/easybuild" |
| 129 | + local previousPackageDirExists = isDir(previousPackageEasyBuildDir) |
| 130 | +
|
| 131 | + -- get the host_injections path, and add only the EESSI_CPU_FAMILY at the end |
| 132 | + local strip_suffix = os.getenv('EESSI_VERSION') .. "/software/" .. os.getenv('EESSI_OS_TYPE') .. "/" |
| 133 | + strip_suffix = strip_suffix .. "os.getenv('EESSI_SOFTWARE_SUBDIR') |
| 134 | + local hostInjections = string.gsub(os.getenv('EESSI_SOFTWARE_PATH') or "", strip_suffix, os.getenv('EESSI_CPU_FAMILY')) |
128 | 135 |
|
129 | 136 | -- build final path where the software should be installed |
130 | 137 | local packageEasyBuildDir = hostInjections .. "/software/" .. t.modFullName .. "/easybuild" |
131 | 138 | local packageDirExists = isDir(packageEasyBuildDir) |
132 | | - if not packageDirExists then |
| 139 | + if previousPackageDirExists and not packageDirExists then |
| 140 | + local targettedAdvice = "but while the module file exists, the actual software is not entirely shipped with EESSI " |
| 141 | + advice = advice .. "due to licencing. You will need to install a full copy of the " .. simpleName .. " package where EESSI " |
| 142 | + advice = advice .. "can find it.\\n" |
| 143 | + advice = advice .. "Note that a full copy is installed at " .. previoushostInjections .. "/software/" .. t.modFullName ". " |
| 144 | + advice = advice .. "However, EESSI now expects it in a different location, namely at " |
| 145 | + advice = advice .. hostInjections .. "/software/" .. t.modFullName "." |
| 146 | + advice = advice .. "Please re-install the package at the new location." |
| 147 | + advice = advice .. refer_to_docs |
| 148 | + elseif not packageDirExists then |
133 | 149 | local advice = "but while the module file exists, the actual software is not entirely shipped with EESSI " |
134 | 150 | advice = advice .. "due to licencing. You will need to install a full copy of the " .. simpleName .. " package where EESSI " |
135 | 151 | advice = advice .. "can find it.\\n" |
|
0 commit comments