mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-25 21:29:05 -05:00
fix: keep platform hashes cores disagree on
When two cores declare different values for one file, the truth keeps the first and marks the entry hash_conflict. Its hashes pair an entry and never replace the platform's: armsx2's GameIndex.yaml no longer overwrites System.dat's line for LRPS2.
This commit is contained in:
1 parent
f7b758a41d
commit
83a4b21d30
3 files changed
+37
-1
No files matched your search
@@ -45,8 +45,17 @@ def checked_hashes(entry: dict | None) -> dict | None:
|
||||
MT32_CONTROL.ROM against nine sha1, and the one md5 beside them
|
||||
replaced System.dat's, another accepted revision. Such a value still
|
||||
pairs a renamed file, it never corrects or fills one.
|
||||
|
||||
`hash_conflict` marks an entry whose cores declare different values: the
|
||||
truth kept the first core's, so its hashes describe one revision among
|
||||
those the cores accept. armsx2 and yaps2 disagree on GameIndex.yaml, and
|
||||
armsx2's revision replaced System.dat's line for LRPS2.
|
||||
"""
|
||||
if not entry or entry.get("validation") is None:
|
||||
if not entry:
|
||||
return entry
|
||||
if entry.get("hash_conflict"):
|
||||
return {k: v for k, v in entry.items() if k not in HASH_FIELDS}
|
||||
if entry.get("validation") is None:
|
||||
return entry
|
||||
raw = entry["validation"]
|
||||
if isinstance(raw, dict):
|
||||
|
||||
@@ -316,6 +316,9 @@ def _merge_hashes(
|
||||
existing[h] = [*o_list, *added]
|
||||
continue
|
||||
if not {str(v).lower() for v in t_list} & {str(v).lower() for v in o_list}:
|
||||
# The value kept is one revision among those the cores accept:
|
||||
# it pairs an entry, it never overrules one (checked_hashes).
|
||||
existing["hash_conflict"] = sorted({*existing.get("hash_conflict", ()), h})
|
||||
# Once per process: a run over every platform met the same pair
|
||||
# once per platform and opened its output on six copies.
|
||||
key = (file_entry["name"], h, str(ours), str(theirs), emu_name)
|
||||
|
||||
Reference in new issue
Block a user