refactor: move profile kinds to their own module

model.systems kept an inline copy of reads_own_files because model.profiles imports it. The predicates live in model.profilekinds, which both import, and model.profiles re-exports them. sitegen.build reads lists_files instead of its own launcher/alias tuple.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 10:29:37 +01:00
1 parent 780d40fb7b
commit 71776198e9
5 files changed
+31 -24

No files matched your search

+2 -1
View File
@@ -7,6 +7,7 @@ import re
from core.cli import suggest_names
from model.platforms import native_layer
from model.profilekinds import reads_own_files
MANUFACTURER_PREFIXES = (
@@ -332,7 +333,7 @@ def system_index(profiles: dict) -> dict[str, tuple[str, set[str]]]:
"""
index: dict[str, tuple[str, set[str]]] = {}
for name, p in sorted(profiles.items()):
if p.get("type") in ("alias", "launcher") or p.get("role") == "test":
if not reads_own_files(p):
continue
for sys_id in p.get("systems", []):
key = norm_system_id(sys_id)