diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2019-08-21 18:32:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-21 18:32:31 -0700 |
commit | 661b1da5d0f55c8298fdbfcebae7d58f9118a4a1 (patch) | |
tree | 86fbb6859acccea2f08a646790936eda2e339e9c /lib | |
parent | 2499c047f01adb06ab315d0c7e04c91a958f9702 (diff) | |
download | spack-661b1da5d0f55c8298fdbfcebae7d58f9118a4a1.tar.gz spack-661b1da5d0f55c8298fdbfcebae7d58f9118a4a1.tar.bz2 spack-661b1da5d0f55c8298fdbfcebae7d58f9118a4a1.tar.xz spack-661b1da5d0f55c8298fdbfcebae7d58f9118a4a1.zip |
'spack spec --yaml' command now writes build deps to yaml (#12317)
This allows "spack spec --yaml" to generate a spec YAML file that can
be used with "spack install -f". Before, this would fail in cases
where the spec had build dependencies.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/spec.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py index 64a4a7edc9..f1a2a08119 100644 --- a/lib/spack/spack/cmd/spec.py +++ b/lib/spack/spack/cmd/spec.py @@ -14,6 +14,7 @@ import spack import spack.cmd import spack.cmd.common.arguments as arguments import spack.spec +import spack.hash_types as ht description = "show what would be installed, given a spec" section = "build" @@ -63,7 +64,7 @@ def spec(parser, args): spec.concretize() # use write because to_yaml already has a newline. - sys.stdout.write(spec.to_yaml()) + sys.stdout.write(spec.to_yaml(hash=ht.build_hash)) continue kwargs['hashes'] = False # Always False for input spec |