refactor: name the profile kinds in model.profiles

lists_files(profile) answers whether a profile declares files, false
for a launcher or an alias, and is_emulator(profile) whether it counts as
an emulator, false for an alias or a test core. Eighteen inline checks in
model, resolve and packs read them; each keeps the set it tested.
model.systems keeps its own check: it sits below model.profiles. No
behavior change.
This commit is contained in:
Abdessamad Derraz committed 2026-11-20 20:03:26 +01:00
1 parent b679edb133
commit 899f591575
13 files changed
+46 -25

No files matched your search

+2 -1
View File
@@ -10,6 +10,7 @@ import re
from model import region
from model.region import NOINTRO
from model.profiles import lists_files
from resolve.localfile import resolve_local_file
@@ -70,7 +71,7 @@ def build_report(profiles: dict, db: dict) -> dict:
by_path = {entry.get("path", ""): sha1 for sha1, entry in db["files"].items()}
for emu_name, profile in sorted(profiles.items()):
if profile.get("type") in ("launcher", "alias"):
if not lists_files(profile):
continue
for f in profile.get("files") or []:
if not isinstance(f, dict) or not f.get("region"):