From b8d15e816bf7388774e65ca59daf3831b4fa4180 Mon Sep 17 00:00:00 2001 From: psakievich Date: Tue, 21 Feb 2023 17:37:14 -0700 Subject: [PATCH] Allow users to specify root env dir (#32836) * Allow users to specify root env dir Environments managed by spack have some advantages over anonymous Environments but they are tucked away inside spack's directory tree. This PR gives users the ability to specify where the environments should live. See #32823 This is also taken as an opportunity to ensure that all references are to "managed environments", rather than "named environments". Prior to this PR some references to the latter persisted. Co-authored-by: Tom Scogland Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Co-authored-by: Gregory Becker --- bin/spack-tmpconfig | 1 + etc/spack/defaults/config.yaml | 4 ++ lib/spack/docs/environments.rst | 9 +++-- lib/spack/spack/cmd/env.py | 2 +- lib/spack/spack/cmd/location.py | 2 +- lib/spack/spack/environment/environment.py | 46 ++++++++++++++++------ lib/spack/spack/main.py | 2 +- lib/spack/spack/schema/config.py | 1 + lib/spack/spack/test/cmd/concretize.py | 9 ++--- lib/spack/spack/test/cmd/env.py | 17 ++++++++ lib/spack/spack/test/cmd/uninstall.py | 5 ++- lib/spack/spack/test/conftest.py | 10 ++--- lib/spack/spack/test/env.py | 18 +++++++++ 13 files changed, 97 insertions(+), 29 deletions(-) diff --git a/bin/spack-tmpconfig b/bin/spack-tmpconfig index a3d053d340..a477daa4d3 100755 --- a/bin/spack-tmpconfig +++ b/bin/spack-tmpconfig @@ -72,6 +72,7 @@ config: root: $TMP_DIR/install misc_cache: $$user_cache_path/cache source_cache: $$user_cache_path/source + environments_root: $TMP_DIR/envs EOF cat >"$SPACK_USER_CONFIG_PATH/bootstrap.yaml" <