fix: read the platform guides on first use

model.guides read and checked _registry.yml and _guides.yml at import,
from the repository: a pack build died on a registry entry without a guide
before parsing its options, and a site run on another platforms folder
took the repository's guides. The guides now load on first use, keyed on
siteinputs.current().platforms, behind accessor functions.
This commit is contained in:
Abdessamad Derraz committed 2026-11-23 21:02:46 +01:00
1 parent 9f987adb8c
commit e8b3cef5d5
31 files changed
+290 -204

No files matched your search

+2 -2
View File
@@ -419,7 +419,7 @@ def _check_get_pages(
"""
sys.path.insert(0, str(Path(__file__).resolve().parent))
from model import releaserecord
from model.guides import INSTALL_SH
from model.guides import install_sh
from model.registry import list_registered_platforms, list_release_pack_platforms
if not (platforms_dir / "_registry.yml").is_file():
@@ -444,7 +444,7 @@ def _check_get_pages(
packs = [a for a in assets if "_BIOS_Pack" in a]
if packs:
issues.append(f"{rel}: links a pack for a setup without one: {packs[0]}")
if f"{INSTALL_SH} | sh" not in (site / rel).read_text(encoding="utf-8"):
if f"{install_sh()} | sh" not in (site / rel).read_text(encoding="utf-8"):
issues.append(f"{rel}: gives no install command")
return issues