From 6a0f9ccf827435817d406cd65c04b7eeba27d561 Mon Sep 17 00:00:00 2001 From: healther Date: Wed, 4 Apr 2018 19:40:56 +0200 Subject: make view understand hashes (#7573) Fixes #7548 This updates the "spack view" command to use the same parsing logic as "spack install" on the user-provided specs. For example you can provide a DAG hash to refer to an exact installed spec instead of specifying name, compiler, etc. --- lib/spack/spack/cmd/view.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index c7e7ff6699..71333a088f 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -172,6 +172,7 @@ def setup_parser(sp): def view(parser, args): 'Produce a view of a set of packages.' + specs = spack.cmd.parse_specs(args.specs) path = args.path[0] view = YamlFilesystemView( @@ -189,18 +190,18 @@ def view(parser, args): elif args.action in actions_link: # only link commands need to disambiguate specs - specs = [spack.cmd.disambiguate_spec(s) for s in args.specs] + specs = [spack.cmd.disambiguate_spec(s) for s in specs] elif args.action in actions_status: # no specs implies all - if len(args.specs) == 0: + if len(specs) == 0: specs = view.get_all_specs() else: - specs = relaxed_disambiguate(args.specs, view) + specs = relaxed_disambiguate(specs, view) else: # status and remove can map the name to packages in view - specs = relaxed_disambiguate(args.specs, view) + specs = relaxed_disambiguate(specs, view) with_dependencies = args.dependencies.lower() in ['true', 'yes'] -- cgit v1.2.3-70-g09d2