'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:
parent
2499c047f0
commit
661b1da5d0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user