diff options
author | Nicolas Derumigny | 2021-11-15 00:23:11 +0100 |
---|---|---|
committer | Nicolas Derumigny | 2021-11-15 00:23:11 +0100 |
commit | 4e13e2544888c77961b21928ecb5fe943de86c3b (patch) | |
tree | 24a76f0b4f625b361575c9e7f734fbe16e16a37f /spack.env.sh.patch | |
parent | 86661980de949d9d4219933be0f3f31cbe733929 (diff) | |
download | aur-4e13e2544888c77961b21928ecb5fe943de86c3b.tar.gz |
Update to spack 17.0.0
Diffstat (limited to 'spack.env.sh.patch')
-rw-r--r-- | spack.env.sh.patch | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/spack.env.sh.patch b/spack.env.sh.patch index 26f9e4f3bc48..405257d54140 100644 --- a/spack.env.sh.patch +++ b/spack.env.sh.patch @@ -1,16 +1,17 @@ ---- share/spack/setup-env.sh 2021-02-19 20:06:33.000000000 +0100 -+++ share/spack/setup-env.sh 2021-03-03 12:23:39.557249552 +0100 -@@ -45,6 +45,9 @@ +--- share/spack/setup-env.sh 2021-11-15 00:06:07.160481958 +0100 ++++ share/spack/setup-env.sh 2021-11-15 00:09:10.820476320 +0100 +@@ -45,6 +45,10 @@ fi export _sp_initializing=true +_pkexec_env() { + /usr/bin/spack $@ +} ++ _spack_shell_wrapper() { # Store LD_LIBRARY_PATH variables from spack shell function -@@ -75,7 +78,7 @@ +@@ -75,7 +79,7 @@ [ "${_sp_flags#*h}" != "${_sp_flags}" ] || \ [ "${_sp_flags#*V}" != "${_sp_flags}" ]; then @@ -19,7 +20,7 @@ return fi -@@ -96,7 +99,7 @@ +@@ -96,7 +100,7 @@ shift fi if [ "$_sp_arg" = "-h" ] || [ "$_sp_arg" = "--help" ]; then @@ -28,7 +29,7 @@ else LOC="$(spack location $_sp_arg "$@")" if [ -d "$LOC" ] ; then -@@ -115,7 +118,7 @@ +@@ -115,7 +119,7 @@ fi if [ "$_sp_arg" = "-h" ] || [ "$_sp_arg" = "--help" ]; then @@ -37,7 +38,7 @@ else case $_sp_arg in activate) -@@ -133,10 +136,10 @@ +@@ -133,10 +137,10 @@ [ "${_a#* --help}" != "$_a" ]; then # No args or args contain --sh, --csh, or -h/--help: just execute. @@ -45,12 +46,12 @@ + _pkexec_env env activate "$@" else # Actual call to activate: source the output. -- eval $(command spack $_sp_flags env activate --sh "$@") -+ eval $(_pkexec_env $_sp_flags env activate --sh "$@") +- stdout="$(command spack $_sp_flags env activate --sh "$@")" || return ++ stdout="$(_pkexec_env $_sp_flags env activate --sh "$@")" || return + eval "$stdout" fi ;; - deactivate) -@@ -151,17 +154,17 @@ +@@ -152,18 +156,18 @@ [ "${_a#* --csh}" != "$_a" ]; then # Args contain --sh or --csh: just execute. @@ -62,8 +63,9 @@ + _pkexec_env env deactivate -h else # No args: source the output of the command. -- eval $(command spack $_sp_flags env deactivate --sh) -+ eval $(_pkexec_env $_sp_flags env deactivate --sh) +- stdout="$(command spack $_sp_flags env deactivate --sh)" || return ++ stdout="$(_pkexec_env $_sp_flags env deactivate --sh)" || return + eval "$stdout" fi ;; *) @@ -72,16 +74,16 @@ ;; esac fi -@@ -181,14 +184,14 @@ +@@ -184,14 +188,14 @@ [ "${_a#* --help}" != "$_a" ]; then # Args contain --sh, --csh, or -h/--help: just execute. - command spack $_sp_flags $_sp_subcommand "$@" + _pkexec_env $_sp_flags $_sp_subcommand "$@" else -- eval $(command spack $_sp_flags $_sp_subcommand --sh "$@" || \ -+ eval $(_pkexec_env $_sp_flags $_sp_subcommand --sh "$@" || \ - echo "return 1") # return 1 if spack command fails +- stdout="$(command spack $_sp_flags $_sp_subcommand --sh "$@")" || return ++ stdout="$(_pkexec_env $_sp_flags $_sp_subcommand --sh "$@")" || return + eval "$stdout" fi ;; *) @@ -90,3 +92,12 @@ ;; esac } +@@ -366,7 +370,7 @@ + _spack_pathadd PATH "${_sp_module_bin}" + fi; + else +- stdout="$(command spack --print-shell-vars sh)" || return ++ stdout="$(_pkexec_env --print-shell-vars sh)" || return + eval "$stdout" + fi; + |