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
@@ -16,6 +16,7 @@ from core.hashing import parse_hash_list, parse_md5_list, stream_hashes
from core.paths import BIOS_DIR, PLATFORMS_DIR, REPO_ROOT
from model.alternatives import set_keys, set_requirements, settle_sets
from model.database import get_mame_clone_map
from model.profiles import lists_files
from model.declarations import OUTER_ROOTS
from model.platforms import load_platform_config
from model.registry import list_registered_platforms, load_data_dir_registry
@@ -1132,7 +1133,7 @@ def _profile_names(profiles: dict[str, dict]) -> tuple[dict[str, list[dict]], di
exact: dict[str, list[dict]] = {}
folded: dict[str, list[dict]] = {}
for profile in profiles.values():
if profile.get("type") in ("launcher", "alias"):
if not lists_files(profile):
continue
for entry in profile.get("files") or []:
names = {str(entry.get("name") or "")} | {str(a) for a in entry.get("aliases") or []}