'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.
This commit is contained in:
Peter Scheibel 2019-08-21 18:32:31 -07:00 committed by GitHub
parent 2499c047f0
commit 661b1da5d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@
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