summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorIan Lumsden <lumsden.ian@gmail.com>2024-07-31 12:36:51 -0700
committerGitHub <noreply@github.com>2024-07-31 21:36:51 +0200
commitad26dcfbfc833984d670a9088d9f70a4f894a9a6 (patch)
treedaee58092fd00690a7e5ae07c8386120f007163e /var
parent5541a184d54b39533f93e61c26e507ae75aa4934 (diff)
downloadspack-ad26dcfbfc833984d670a9088d9f70a4f894a9a6.tar.gz
spack-ad26dcfbfc833984d670a9088d9f70a4f894a9a6.tar.bz2
spack-ad26dcfbfc833984d670a9088d9f70a4f894a9a6.tar.xz
spack-ad26dcfbfc833984d670a9088d9f70a4f894a9a6.zip
flux-core,flux-sched: fix environments with external flux (#44775)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/flux-core/package.py6
-rw-r--r--var/spack/repos/builtin/packages/flux-sched/package.py6
2 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py
index 3d0e128ee4..016ca57c8b 100644
--- a/var/spack/repos/builtin/packages/flux-core/package.py
+++ b/var/spack/repos/builtin/packages/flux-core/package.py
@@ -181,6 +181,12 @@ class FluxCore(AutotoolsPackage):
env.append_path("LUA_PATH", "./?.lua", separator=";")
def setup_run_environment(self, env):
+ # If this package is external, we expect the external provider to set things
+ # like LUA paths. So, we early return. If the package is not external,
+ # properly set these environment variables to make sure the user environment
+ # is configured correctly
+ if self.spec.external:
+ return
env.prepend_path(
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
)
diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py
index 3f97fb0d76..d75024e041 100644
--- a/var/spack/repos/builtin/packages/flux-sched/package.py
+++ b/var/spack/repos/builtin/packages/flux-sched/package.py
@@ -166,6 +166,12 @@ class FluxSched(CMakePackage, AutotoolsPackage):
return os.path.join("lib", "lua", str(self.lua_version))
def setup_run_environment(self, env):
+ # If this package is external, we expect the external provider to set
+ # things like LUA paths. So, we early return. If the package is not
+ # external, properly set these environment variables to make sure the
+ # user environment is configured correctly
+ if self.spec.external:
+ return
env.prepend_path(
"LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";"
)