mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-16 16:33:27 -05:00
fix: let a proven claim answer an unmatched pin
This commit is contained in:
1 parent
598c930771
commit
3e14c9df1f
5 files changed
+41
-19
No files matched your search
+6
-6
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
+11
-1
@@ -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)
|
||||
|
||||
|
||||
@@ -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"), [])
|
||||
|
||||
Reference in new issue
Block a user