mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
fix: verify and pack report consistent untested counts
generate_pack.py skipped duplicate destination entries before running verification, hiding untested files that verify.py caught. Now all entries are verified even when the file is already packed, ensuring both tools report the same untested count. Batocera: verify 679/680 (1 untested), pack 358/359 (1 untested). Both report sc3000.zip as the single untested file.
This commit is contained in:
@@ -305,13 +305,14 @@ def generate_pack(
|
||||
full_dest = dest
|
||||
|
||||
dedup_key = full_dest
|
||||
if dedup_key in seen_destinations:
|
||||
continue
|
||||
seen_destinations.add(dedup_key)
|
||||
already_packed = dedup_key in seen_destinations
|
||||
|
||||
storage = file_entry.get("storage", "embedded")
|
||||
|
||||
if storage == "user_provided":
|
||||
if already_packed:
|
||||
continue
|
||||
seen_destinations.add(dedup_key)
|
||||
instructions = file_entry.get("instructions", "Please provide this file manually.")
|
||||
instr_name = f"INSTRUCTIONS_{file_entry['name']}.txt"
|
||||
instr_path = f"{base_dest}/{instr_name}" if base_dest else instr_name
|
||||
@@ -343,13 +344,12 @@ def generate_pack(
|
||||
continue
|
||||
|
||||
if status == "not_found":
|
||||
missing_files.append(file_entry["name"])
|
||||
if not already_packed:
|
||||
missing_files.append(file_entry["name"])
|
||||
continue
|
||||
|
||||
if status == "hash_mismatch":
|
||||
if verification_mode != "existence":
|
||||
# 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
|
||||
@@ -360,6 +360,10 @@ def generate_pack(
|
||||
else:
|
||||
untested_files.append(file_entry["name"])
|
||||
|
||||
if already_packed:
|
||||
continue
|
||||
seen_destinations.add(dedup_key)
|
||||
|
||||
extract = file_entry.get("extract", False)
|
||||
if extract and local_path.endswith(".zip"):
|
||||
_extract_zip_to_archive(local_path, full_dest, zf)
|
||||
|
||||
Reference in New Issue
Block a user