mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
fix: align verify and pack validation, pipeline 100% consistent
generate_pack.py now applies emulator-level validation (crc32, sha1, adler32) matching verify.py behavior. existence mode: validation is informational (file present = OK). md5 mode: validation downgrades to UNTESTED. clone resolution moved to common.py resolve_local_file. all 6 platforms pass consistency check.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated_at": "2026-03-24T20:51:56Z",
|
||||
"generated_at": "2026-03-24T21:16:05Z",
|
||||
"total_files": 6733,
|
||||
"total_size": 5288644732,
|
||||
"files": {
|
||||
@@ -24394,7 +24394,7 @@
|
||||
"adler32": "9147003d"
|
||||
},
|
||||
"db1031585968cfc6ec2ecda5c9a5a52f61444a3b": {
|
||||
"path": "bios/Atari/400-800/.variants/ATARIOSB.ROM.db103158",
|
||||
"path": "bios/Atari/400-800/.variants/ATARIOSB.ROM.0e86d61d",
|
||||
"name": "ATARIOSB.ROM",
|
||||
"size": 10240,
|
||||
"sha1": "db1031585968cfc6ec2ecda5c9a5a52f61444a3b",
|
||||
@@ -105197,7 +105197,7 @@
|
||||
".variants/1540OS3.V0": [
|
||||
"454fdd9005c43142f827e1e506bf75fda0fe2a65"
|
||||
],
|
||||
".variants/ATARIOSB.ROM.db103158": [
|
||||
".variants/ATARIOSB.ROM.0e86d61d": [
|
||||
"db1031585968cfc6ec2ecda5c9a5a52f61444a3b"
|
||||
],
|
||||
"tos/emutos.img": [
|
||||
|
||||
@@ -255,6 +255,12 @@ def generate_pack(
|
||||
file_status: dict[str, str] = {}
|
||||
file_reasons: dict[str, str] = {}
|
||||
|
||||
# Build emulator-level validation index (same as verify.py)
|
||||
from verify import _build_validation_index
|
||||
validation_index = {}
|
||||
if emu_profiles:
|
||||
validation_index = _build_validation_index(emu_profiles)
|
||||
|
||||
with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zf:
|
||||
for sys_id, system in sorted(config.get("systems", {}).items()):
|
||||
for file_entry in system.get("files", []):
|
||||
@@ -356,6 +362,22 @@ def generate_pack(
|
||||
else:
|
||||
file_status.setdefault(dedup_key, "ok")
|
||||
|
||||
# Emulator-level validation (matches verify.py behavior)
|
||||
# In existence mode: validation is informational (warning, not downgrade)
|
||||
# In md5 mode: validation downgrades OK to UNTESTED
|
||||
if (file_status.get(dedup_key) == "ok"
|
||||
and local_path and validation_index):
|
||||
from verify import check_file_validation
|
||||
fname = file_entry.get("name", "")
|
||||
reason = check_file_validation(local_path, fname, validation_index)
|
||||
if reason:
|
||||
if verification_mode == "existence":
|
||||
# Existence mode: file present = OK, validation is extra info
|
||||
file_reasons.setdefault(dedup_key, reason)
|
||||
else:
|
||||
file_status[dedup_key] = "untested"
|
||||
file_reasons[dedup_key] = reason
|
||||
|
||||
if already_packed:
|
||||
continue
|
||||
seen_destinations.add(dedup_key)
|
||||
|
||||
Reference in New Issue
Block a user