From 661b1da5d0f55c8298fdbfcebae7d58f9118a4a1 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 21 Aug 2019 18:32:31 -0700 Subject: '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. --- lib/spack/spack/cmd/spec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3-70-g09d2