File Make-spack-paths-compliant-to-distro-installation.patch of Package spack
From: Egbert Eich <eich@suse.com>
Date: Wed Nov 10 09:40:07 2021 +0100
Subject: Make spack paths compliant to distro installation
Patch-mainline: Not yet
Git-repo: https://github.com/spack/spack
Git-commit: f91da8159ac285f41d215f0bf7d3a15461e63324
References:
Spack is particular about the choice of 'prefix' which will
replace $spack. 'prefix' is the 4th ancestor of paths.py, so
it is relative to the spack installation.
This will only change the coded setups of
var_path -> /var/lib/spack
opt_path -> /opt/spack
Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
lib/spack/spack/paths.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/spack/spack/paths.py b/lib/spack/spack/paths.py
index 6b3543406b..bb16e14145 100644
--- a/lib/spack/spack/paths.py
+++ b/lib/spack/spack/paths.py
@@ -41,7 +41,7 @@
operating_system_path = os.path.join(module_path, 'operating_systems')
test_path = os.path.join(module_path, "test")
hooks_path = os.path.join(module_path, "hooks")
-opt_path = os.path.join(prefix, "opt")
+opt_path = os.path.join("/", "opt")
share_path = os.path.join(prefix, "share", "spack")
etc_path = os.path.join(prefix, "etc")
@@ -49,7 +49,7 @@
#
# Things in $spack/var/spack
#
-var_path = os.path.join(prefix, "var", "spack")
+var_path = os.path.join("/", "var", "lib", "spack")
# read-only things in $spack/var/spack
repos_path = os.path.join(var_path, "repos")