diff options
author | healther <healther@users.noreply.github.com> | 2018-04-04 19:40:56 +0200 |
---|---|---|
committer | scheibelp <scheibel1@llnl.gov> | 2018-04-04 10:40:56 -0700 |
commit | 6a0f9ccf827435817d406cd65c04b7eeba27d561 (patch) | |
tree | a6c7ea9757e93e1ff51847d76d2670b55cae52cc /lib | |
parent | 3f14212dede2444fdbb85065d9b5f55f73b210e4 (diff) | |
download | spack-6a0f9ccf827435817d406cd65c04b7eeba27d561.tar.gz spack-6a0f9ccf827435817d406cd65c04b7eeba27d561.tar.bz2 spack-6a0f9ccf827435817d406cd65c04b7eeba27d561.tar.xz spack-6a0f9ccf827435817d406cd65c04b7eeba27d561.zip |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/view.py | 9 |
1 files changed, 5 insertions, 4 deletions
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'] |