Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions stackinator/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,14 @@ def generate(self, recipe):
with (config_path / "packages.yaml").open("w") as f:
f.write(yaml.dump(recipe.packages["build"]))

config_yaml = {"config": {"install_tree": {"root": str(recipe.mount)}}}
with (config_path / "config.yaml").open("w") as f:
# Merge install_tree into any config.yaml the mirror layer already wrote
# (e.g. config:source_cache from mirrors.yaml at lines 167-170 above).
config_file = config_path / "config.yaml"
config_yaml = {}
if config_file.exists():
config_yaml = yaml.safe_load(config_file.read_text()) or {}
config_yaml.setdefault("config", {})["install_tree"] = {"root": str(recipe.mount)}
with config_file.open("w") as f:
f.write(yaml.dump(config_yaml))

# Add custom spack package recipes, configured via Spack repos.
Expand Down
Loading