From 3e14c9df1f010ef4bbf9f7e96dcaf5ef52e71f22 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 16 Oct 2026 20:05:48 +0200 Subject: [PATCH] fix: let a proven claim answer an unmatched pin --- install/lakka.json | 12 ++++++------ install/retroarch.json | 12 ++++++------ install/retropie.json | 12 ++++++------ scripts/slots.py | 12 +++++++++++- tests/test_slots.py | 12 ++++++++++++ 5 files changed, 41 insertions(+), 19 deletions(-) diff --git a/install/lakka.json b/install/lakka.json index 43c14b32..a13fd496 100644 --- a/install/lakka.json +++ b/install/lakka.json @@ -17,9 +17,9 @@ ], "standalone_copies": [], "total_files": 5869, - "total_size": 6161070712, + "total_size": 6160844731, "pack_files": 8512, - "pack_size": 6201603239, + "pack_size": 6201377258, "total_omitted": 0, "omitted_files": [], "core_names": { @@ -9531,10 +9531,10 @@ }, { "dest": "neocdz.zip", - "sha1": "9cab31cfe7eacb6871d36cee105d87b90fd85b64", - "sha256": "d828241905d390c5de4867646296f615c95bca2f5d8f7e81d50e08717373a821", - "size": 1181333, - "repo_path": "bios/Arcade/Arcade/neocdz.zip", + "sha1": "712816a3c41baf4129e23d645305a536e03d69de", + "sha256": "f885f2cc79b5c0120ca316b0db360183c2b9a60bc727cbe211b7518e12bd5548", + "size": 955352, + "repo_path": "bios/SNK/Neo Geo CD/.variants/neocdz.zip.712816a3", "cores": null, "systems": [ "snk-neogeo-cd" diff --git a/install/retroarch.json b/install/retroarch.json index e2b49e4a..ea970443 100644 --- a/install/retroarch.json +++ b/install/retroarch.json @@ -256,9 +256,9 @@ } ], "total_files": 5869, - "total_size": 6161070712, + "total_size": 6160844731, "pack_files": 8512, - "pack_size": 6201603239, + "pack_size": 6201377258, "total_omitted": 0, "omitted_files": [], "core_names": { @@ -9770,10 +9770,10 @@ }, { "dest": "neocdz.zip", - "sha1": "9cab31cfe7eacb6871d36cee105d87b90fd85b64", - "sha256": "d828241905d390c5de4867646296f615c95bca2f5d8f7e81d50e08717373a821", - "size": 1181333, - "repo_path": "bios/Arcade/Arcade/neocdz.zip", + "sha1": "712816a3c41baf4129e23d645305a536e03d69de", + "sha256": "f885f2cc79b5c0120ca316b0db360183c2b9a60bc727cbe211b7518e12bd5548", + "size": 955352, + "repo_path": "bios/SNK/Neo Geo CD/.variants/neocdz.zip.712816a3", "cores": null, "systems": [ "snk-neogeo-cd" diff --git a/install/retropie.json b/install/retropie.json index 6af5821a..43054933 100644 --- a/install/retropie.json +++ b/install/retropie.json @@ -16,9 +16,9 @@ ], "standalone_copies": [], "total_files": 9906, - "total_size": 8495341943, + "total_size": 8495115962, "pack_files": 12549, - "pack_size": 8535874470, + "pack_size": 8535648489, "total_omitted": 0, "omitted_files": [], "core_names": { @@ -9579,10 +9579,10 @@ }, { "dest": "neocdz.zip", - "sha1": "9cab31cfe7eacb6871d36cee105d87b90fd85b64", - "sha256": "d828241905d390c5de4867646296f615c95bca2f5d8f7e81d50e08717373a821", - "size": 1181333, - "repo_path": "bios/Arcade/Arcade/neocdz.zip", + "sha1": "712816a3c41baf4129e23d645305a536e03d69de", + "sha256": "f885f2cc79b5c0120ca316b0db360183c2b9a60bc727cbe211b7518e12bd5548", + "size": 955352, + "repo_path": "bios/SNK/Neo Geo CD/.variants/neocdz.zip.712816a3", "cores": null, "systems": [ "snk-neogeo-cd" diff --git a/scripts/slots.py b/scripts/slots.py index 4468a724..2eacb548 100644 --- a/scripts/slots.py +++ b/scripts/slots.py @@ -348,6 +348,14 @@ def find_conflicts( # all acceptable at one destination, and the platform choosing one of them # is agreement, not contradiction. Only a destination where no profile # claim at all matches what ships is a disagreement. + # A platform claim resting on a bare name, or on a pin no local file + # matches, asserts nothing about content. Where the frontend never reads + # the bytes, a proven profile claim then decides: RetroArch's neocdz.zip + # pins an md5 nobody holds, and the primary shipped without the 000-lo.lo + # geolith and FBNeo read inside it. + path_only = not nativemode.reads_file_contents( + config.get("verification_mode", "existence") + ) by_slot: dict[str, list[Claim]] = {} for claim in profile_claims( profiles, db, base_dest, standalone_cores, zip_contents, data_dir_registry, @@ -355,7 +363,9 @@ def find_conflicts( ): key = _normalize(claim.destination, fold) platform = by_dest.get(key) - if platform is None or not platform.is_proven or not claim.is_proven: + if platform is None or not claim.is_proven: + continue + if not platform.is_proven and not (path_only and platform.local_path): continue by_slot.setdefault(key, []).append(claim) diff --git a/tests/test_slots.py b/tests/test_slots.py index cb6fae52..e3d67bc0 100644 --- a/tests/test_slots.py +++ b/tests/test_slots.py @@ -703,6 +703,18 @@ class AnArchiveIsClaimedByItsMembers(unittest.TestCase): conflicts = slots.find_conflicts(config, self.profiles, self.db, "system") self.assertEqual([c.destination for c in conflicts], ["system/fbneo/neocdz.zip"]) + def test_a_pin_nobody_holds_yields_where_only_the_path_is_checked(self): + """RetroArch's root neocdz.zip pins an md5 no local file has: the + name answered with the short copy, and no claim was ever compared.""" + config = self._config("existence", "short") + config["systems"]["snk-neogeo-cd"]["files"][0].update( + destination="neocdz.zip", md5="f" * 32 + ) + overrides = slots.pack_overrides(config, self.profiles, self.db) + self.assertEqual(overrides, {"system/neocdz.zip": self.paths["full"][0]}) + config["verification_mode"] = "md5" + self.assertEqual(slots.find_conflicts(config, self.profiles, self.db, "system"), []) + def test_a_pin_holding_the_members_is_agreement(self): config = self._config("md5", "full") self.assertEqual(slots.find_conflicts(config, self.profiles, self.db, "system"), [])