fix: read composite zip md5s apart in diff_truth

Recalbox hashes a .zip by its members. diff_truth set that composite
against the profile's container md5 and reported neocdz.zip and
neocd.zip as mismatches. _hash_mismatch now drops it through
comparable(), the rule pair_entries and the export already apply.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 06:12:08 +02:00
1 parent b8baf92f1d
commit f19a8f99d3
2 files changed
+24 -2

No files matched your search

+5 -2
View File
@@ -735,10 +735,13 @@ def _hash_mismatch(t_entry: dict, s_entry: dict) -> dict | None:
A value shared on any field settles it: the truth holds every revision a
core accepts, and a profile may give one revision's sha1 without its md5.
A hash the code does not check contradicts nothing (checked_hashes).
A hash the code does not check contradicts nothing (checked_hashes), and
a platform md5 that is a composite of a zip's members is no container
md5 (comparable), the rule pair_entries applies.
"""
from exporter.baseline import checked_hashes
from exporter.baseline import checked_hashes, comparable
s_entry = comparable(s_entry)
if _hash_set(t_entry) & _hash_set(s_entry):
return None
t_entry = checked_hashes(t_entry) or {}