feat: file mame device sets by their machines

The -listxml names, for every machine, its parent (romof), the devices of its default configuration (device_ref) and the cards its slots offer (slotoption). A machine takes the system of the first set on its romof chain a written entry lists, and passes it to each device it can instantiate. A device set reached from one system gets system:, from several the new per-entry systems:, from none neither, and keeps serving every system of the profile. The gap report, the core extras and slots read the entry's own systems, so generate_pack --system and the installer pick by them.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 11:33:39 +02:00
1 parent 7ae3a63fad
commit 56e8cbe046
14 files changed
+604 -27

No files matched your search

+23
View File
@@ -59,6 +59,7 @@ def _validate_yaml_directory(
out.extend(_unreachable_citations(path, data))
if schema_name == "emulator.schema.json":
out.extend(_checks_without_values(path, data))
out.extend(_systems_outside_profile(path, data))
out.extend(_doubled_paths(path))
return out
@@ -72,6 +73,28 @@ _CHECK_FIELDS = {
}
def _systems_outside_profile(path: Path, document: object) -> list[str]:
"""An entry's systems: naming a system its profile does not list.
A --system pick selects the profile by its systems: and then the entry
by its own, so a name the profile lacks is one no pick ever reaches.
"""
if not isinstance(document, dict):
return []
listed = {str(s) for s in document.get("systems") or []}
out: list[str] = []
for index, entry in enumerate(document.get("files") or []):
if not isinstance(entry, dict):
continue
unknown = [str(s) for s in entry.get("systems") or [] if str(s) not in listed]
if unknown:
out.append(
f"{path.relative_to(ROOT)}: files[{index}] ({entry.get('name')}) "
f"systems {', '.join(unknown)} not in the profile's systems"
)
return out
def _checks_without_values(path: Path, document: object) -> list[str]:
"""A check an entry declares with nothing to compare against.