mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-11 20:43:50 -06:00
fix: compare system packs in pipeline step 5
Step 5 built emulator packs one profile at a time, where two profiles never share a path. It now also builds each system pack that gathers several profiles and compares it with verify. The first run found five standalone MSX and ColecoVision packs where verify skipped the data tree of a profile the system filter left without files, and credited msx-emu's copies the pack never wrote. verify now places those trees too: 541 system packs, all equal.
This commit is contained in:
1 parent
b20d65d129
commit
c1f0e8c2ca
5 files changed
+137
-24
No files matched your search
+26
-18
@@ -2116,6 +2116,30 @@ def verify_emulator(
|
||||
return
|
||||
placed[dest.lower()] = (path, owner, dest)
|
||||
_register_path(dest, placed_files, placed_parents)
|
||||
|
||||
def occupy_trees(emu_name: str, profile: dict) -> None:
|
||||
"""The profile's data trees follow its files in the pack, which
|
||||
writes them even when the system filter leaves it no file:
|
||||
bluemsx's Machines/ tree holds msx-emu's coleco.rom path in a
|
||||
--system colecovision pack."""
|
||||
for dd in deliverable(profile.get("data_directories", []), standalone):
|
||||
cache = (data_registry or {}).get(dd.get("ref", ""), {}).get("local_cache", "")
|
||||
if not cache or not os.path.isdir(cache):
|
||||
continue
|
||||
dd_dest = dd.get("destination", "")
|
||||
structure = profile.get("pack_structure")
|
||||
prefix = (
|
||||
structure.get("standalone" if standalone else "libretro", "")
|
||||
if structure else ""
|
||||
)
|
||||
if prefix:
|
||||
dd_dest = f"{prefix}/{dd_dest}" if dd_dest else prefix
|
||||
for root, _dirs, names in os.walk(cache):
|
||||
for fname in names:
|
||||
src = os.path.join(root, fname)
|
||||
rel = os.path.relpath(src, cache).replace(os.sep, "/")
|
||||
occupy(f"{dd_dest}/{rel}" if dd_dest else rel, src, emu_name)
|
||||
|
||||
for emu_name, profile in sorted(selected):
|
||||
files = expand_agnostic_entries(
|
||||
expand_directory_entries(
|
||||
@@ -2162,6 +2186,7 @@ def verify_emulator(
|
||||
"ground_truth": [],
|
||||
}
|
||||
)
|
||||
occupy_trees(emu_name, profile)
|
||||
continue
|
||||
|
||||
# Verify archives as units (e.g., neogeo.zip, aes.zip)
|
||||
@@ -2424,24 +2449,7 @@ def verify_emulator(
|
||||
) > _SEVERITY_ORDER.get(prev_sev, 0):
|
||||
file_severity[dest] = sev
|
||||
|
||||
# The profile's data trees follow its files in the pack.
|
||||
for dd in deliverable(profile.get("data_directories", []), standalone):
|
||||
cache = (data_registry or {}).get(dd.get("ref", ""), {}).get("local_cache", "")
|
||||
if not cache or not os.path.isdir(cache):
|
||||
continue
|
||||
dd_dest = dd.get("destination", "")
|
||||
structure = profile.get("pack_structure")
|
||||
prefix = (
|
||||
structure.get("standalone" if standalone else "libretro", "")
|
||||
if structure else ""
|
||||
)
|
||||
if prefix:
|
||||
dd_dest = f"{prefix}/{dd_dest}" if dd_dest else prefix
|
||||
for root, _dirs, names in os.walk(cache):
|
||||
for fname in names:
|
||||
src = os.path.join(root, fname)
|
||||
rel = os.path.relpath(src, cache).replace(os.sep, "/")
|
||||
occupy(f"{dd_dest}/{rel}" if dd_dest else rel, src, emu_name)
|
||||
occupy_trees(emu_name, profile)
|
||||
|
||||
counts = {
|
||||
Severity.OK: 0,
|
||||
|
||||
Reference in new issue
Block a user