Skip to content

Commit

Permalink
fix check_package_config.py for version-less package entries
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Feb 13, 2024
1 parent 4bf1051 commit 382d8c3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions util/check_package_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@
## Iterate over concretized packages
for concrete_spec in spack_lock["concrete_specs"].values():
concrete_name = concrete_spec["name"]
# Ignore user-specified packages:
if concrete_name in sys.argv[1:]:
continue
concrete_version = concrete_spec["version"]
if concrete_name in packages_versions["packages"].keys():
# Check whether concretized package has specified version from common/packages.yaml
config_version = packages_versions["packages"][concrete_name]["version"][0]
if concrete_version != config_version:
iret = 1
print(
f"WARNING: '{concrete_name}' concretized version {concrete_version} does not match {config_version} specified in $SPACK_ENV/common/packages.yaml"
)
if "version" in packages_versions["packages"][concrete_name].keys():
config_version = packages_versions["packages"][concrete_name]["version"][0]
if concrete_version != config_version:
iret = 1
print(
f"WARNING: '{concrete_name}' concretized version {concrete_version} does not match {config_version} specified in $SPACK_ENV/common/packages.yaml"
)
# Check whether concretized variants match settings from common/packages.yaml
config_variants = packages_versions["packages"][concrete_name]["variants"].split()
for config_variant in config_variants:
Expand Down

0 comments on commit 382d8c3

Please sign in to comment.