fix: place a standalone build's gaps at its path

The gap report took a file's libretro path even where the platform
runs the standalone build, so it named Cemu/keys.txt for Batocera
while verify named keys.txt, and settled the declaration on a slot
the platform never fills. Both now read standalone_path there.
This commit is contained in:
Abdessamad Derraz committed 2026-10-18 04:01:02 +02:00
1 parent df288f8c33
commit b6f6798c15
2 files changed
+33 -1

No files matched your search

+8 -1
View File
@@ -504,7 +504,14 @@ def _cross_reference_profile(
for f in emu_files:
fname = f.get("name", "")
effective_path = f.get("path") or fname
# The destination the running build reads, as find_undeclared_files
# takes it: Batocera's standalone Cemu reads keys.txt at
# standalone_path, and the libretro Cemu/keys.txt reported here
# settled the declaration on a slot the platform never fills.
if is_standalone:
effective_path = f.get("standalone_path") or f.get("path") or fname
else:
effective_path = f.get("path") or fname
seen_key = slot_key(f)
if not fname or seen_key in seen_files:
continue
+25
View File
@@ -46,5 +46,30 @@ class OneRule(unittest.TestCase):
self.assertIn("declaration_settles(", source, module)
class TheRunningBuildPlacesTheGap(unittest.TestCase):
"""Batocera runs Cemu standalone, which reads keys.txt at its
standalone_path. The gap report gave the libretro Cemu/keys.txt while
verify gave keys.txt: 163 entries told apart, and the declaration was
settled on a slot the platform never fills."""
KEYS = {"name": "keys.txt", "path": "Cemu/keys.txt",
"standalone_path": "keys.txt", "required": True}
def _gap_paths(self, standalone: set[str]) -> list[str]:
profiles = {"cemu": {"emulator": "Cemu", "type": "standalone + libretro",
"systems": ["nintendo-wiiu"], "files": [self.KEYS]}}
report = cross_reference(
profiles, {}, {"files": {}, "indexes": {}}, all_declared={},
standalone_cores=standalone,
)
return [g["path"] for g in report["cemu"]["gap_details"]]
def test_a_standalone_build_reads_its_own_path(self):
self.assertEqual(self._gap_paths({"cemu"}), ["keys.txt"])
def test_the_core_reads_the_libretro_path(self):
self.assertEqual(self._gap_paths(set()), ["Cemu/keys.txt"])
if __name__ == "__main__":
unittest.main()