diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2018-11-11 02:04:43 -0600 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2018-11-11 18:32:24 -0600 |
commit | 0f2bfd74924da41264b7007f20c6832cabf51b4d (patch) | |
tree | 1465f1fd11cc36621e749bbe2c0021c29bec424a /lib | |
parent | 8d92fd66401a46af641c799394480140300f2e3d (diff) | |
download | spack-0f2bfd74924da41264b7007f20c6832cabf51b4d.tar.gz spack-0f2bfd74924da41264b7007f20c6832cabf51b4d.tar.bz2 spack-0f2bfd74924da41264b7007f20c6832cabf51b4d.tar.xz spack-0f2bfd74924da41264b7007f20c6832cabf51b4d.zip |
env: fix display of concretized specs in `spack find`
- fix highlighting of roots in concretized specs in `spack find`
- tighten up the `spack find` output in environments
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/find.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 358e3c6f01..b1ea65dfc1 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -133,7 +133,7 @@ def setup_env(env): def decorator(spec, fmt): # add +/-/* to show added/removed/root specs - if spec in roots: + if any(spec.dag_hash() == r.dag_hash() for r in roots): return color.colorize('@*{%s}' % fmt) elif spec in removed: return color.colorize('@K{%s}' % fmt) @@ -171,12 +171,10 @@ def find(parser, args): if env: tty.msg('In environment %s' % env.name) - print() - tty.msg('Root specs') - if not env.user_specs: - print('none') + tty.msg('No root specs') else: + tty.msg('Root specs') display_specs( env.user_specs, args, decorator=lambda s, f: color.colorize('@*{%s}' % f)) |