From 0f2bfd74924da41264b7007f20c6832cabf51b4d Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 11 Nov 2018 02:04:43 -0600 Subject: 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 --- lib/spack/spack/cmd/find.py | 8 +++----- 1 file 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)) -- cgit v1.2.3-70-g09d2