mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-17 14:22:32 -05:00
fix: zipped_file hash_mismatch handling in pack generation
resolve_local_file returns hash_mismatch for zipped_file entries because container MD5 differs from inner ROM MD5. This is expected. Reverted the flawed deferral approach in common.py that resolved to wrong ZIPs via zip_contents flat index (electron64.zip instead of bbcb.zip when inner ROMs share the same MD5). Fixed generate_pack.py to verify inner ZIP content via check_inside_zip before marking as untested, matching verify.py behavior. pc6001/bbcb/fm7 ZIPs now correctly verified. verify.py: 679/680 Batocera (1 untested: sc3000 true mismatch) generate_pack.py: 359/359 Batocera (0 untested)
This commit is contained in:
@@ -348,7 +348,17 @@ def generate_pack(
|
|||||||
|
|
||||||
if status == "hash_mismatch":
|
if status == "hash_mismatch":
|
||||||
if verification_mode != "existence":
|
if verification_mode != "existence":
|
||||||
untested_files.append(file_entry["name"])
|
# For zipped_file entries, hash_mismatch is expected
|
||||||
|
# (container MD5 ≠ inner ROM MD5). Verify inner content.
|
||||||
|
zf_name = file_entry.get("zipped_file")
|
||||||
|
if zf_name and local_path:
|
||||||
|
from verify import check_inside_zip
|
||||||
|
inner_md5 = file_entry.get("md5", "")
|
||||||
|
result = check_inside_zip(local_path, zf_name, inner_md5)
|
||||||
|
if result != "ok":
|
||||||
|
untested_files.append(file_entry["name"])
|
||||||
|
else:
|
||||||
|
untested_files.append(file_entry["name"])
|
||||||
|
|
||||||
extract = file_entry.get("extract", False)
|
extract = file_entry.get("extract", False)
|
||||||
if extract and local_path.endswith(".zip"):
|
if extract and local_path.endswith(".zip"):
|
||||||
|
|||||||
Reference in New Issue
Block a user