summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrian Van Essen <vanessen1@llnl.gov>2022-06-17 16:52:06 -0500
committerGitHub <noreply@github.com>2022-06-17 21:52:06 +0000
commit15c35a3cff138c3777d756b61ec1940883260d20 (patch)
treec5b3e5c34b1b6b13e68a5736d019425e75262a68 /lib
parent249c90f909e4ba21047271b247304caa3f2251d8 (diff)
downloadspack-15c35a3cff138c3777d756b61ec1940883260d20.tar.gz
spack-15c35a3cff138c3777d756b61ec1940883260d20.tar.bz2
spack-15c35a3cff138c3777d756b61ec1940883260d20.tar.xz
spack-15c35a3cff138c3777d756b61ec1940883260d20.zip
Bugfix external find --all for libraries (#31186)
* Fixed a bug in the 'external find --all' command where the call failed to find packages by both executable and library. The bug was that the call `path.all_packages()` incorrectly turned the variable `packages_to_check` into a generator rather than keeping it a list. Thus the second call to `detection.by_library` had no work to do. * Fixed the help message for the find external and compiler commands as well as others that used the `scopes_metavar` field to define where the results should be stored in configuration space. Specifically, the fact that configuration could be added to the environment was not mentioned in the help message.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/external.py2
-rw-r--r--lib/spack/spack/config.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py
index 98091530f1..e08bd13876 100644
--- a/lib/spack/spack/cmd/external.py
+++ b/lib/spack/spack/cmd/external.py
@@ -125,7 +125,7 @@ def external_find(args):
# If the list of packages is empty, search for every possible package
if not args.tags and not packages_to_check:
- packages_to_check = spack.repo.path.all_packages()
+ packages_to_check = list(spack.repo.path.all_packages())
detected_packages = spack.detection.by_executable(
packages_to_check, path_hints=args.path)
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index ce90ed231e..2eb603780a 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -110,7 +110,7 @@ config_defaults = {
#: metavar to use for commands that accept scopes
#: this is shorter and more readable than listing all choices
-scopes_metavar = '{defaults,system,site,user}[/PLATFORM]'
+scopes_metavar = '{defaults,system,site,user}[/PLATFORM] or env:ENVIRONMENT'
#: Base name for the (internal) overrides scope.
overrides_base_name = 'overrides-'