Skip to content

Commit 773f83d

Browse files
committed
enforce arch_folder:false
1 parent 312b11b commit 773f83d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

stackinator/recipe.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,16 @@ def environment_view_meta(self):
317317
def modules_yaml(self):
318318
with self.modules.open() as fid:
319319
raw = yaml.load(fid, Loader=yaml.Loader)
320+
321+
# Note:
322+
# Differently from spack, uenv does not support "arch_folder".
323+
# With `uenv --view modules`, MODULEPATH is set by uenv (metadata provided by envvars.py)
324+
# to `/{self.mount}/modules`, differently from spack that, by default, adds to MODULEPATH
325+
# all arch_folder paths available on the system (e.g. linux-sles15-neoverse_v2).
326+
if raw["modules"]["default"].get("arch_folder", True):
327+
self._logger.critical("modules:default:arch_folder:true is not supported")
328+
raise RuntimeError("modules.yaml with arch_folder enabled is not supported")
329+
320330
raw["modules"]["default"]["roots"]["tcl"] = (pathlib.Path(self.mount) / "modules").as_posix()
321331
return yaml.dump(raw)
322332

0 commit comments

Comments
 (0)