From 4713c17d8af84fba3499cd3141ed93d287495649 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Thu, 17 Aug 2017 12:18:04 -0600 Subject: [PATCH] Fix build_environment.txt file. Instead of copying software_environment.txt, just generate the build_environment file from scratch at build time. This will ensure env changes made after case.setup are reflected accurately. [BFB] --- scripts/lib/CIME/provenance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/lib/CIME/provenance.py b/scripts/lib/CIME/provenance.py index 420680b9c89..7fc84b5d6b5 100644 --- a/scripts/lib/CIME/provenance.py +++ b/scripts/lib/CIME/provenance.py @@ -60,7 +60,8 @@ def _save_build_provenance_acme(case, lid): env_prov = os.path.join(exeroot, "build_environment.%s.txt" % lid) if os.path.exists(env_prov): os.remove(env_prov) - copy_umask(os.path.join(caseroot, "software_environment.txt"), env_prov) + env_module = case.get_env("mach_specific") + env_module.save_all_env_info(env_prov) # For all the just-created post-build provenance files, symlink a generic name # to them to indicate that these are the most recent or active.