fix: take an unchecked version as a match in packs

Raze lists three sized BLOOD.RFF versions and a fourth it takes without a check, the shareware RFF the collection holds. The Batocera pack printed two DISCREPANCY lines for it that verify never showed. A slot with an unchecked sibling now accepts any copy for that core, in the validation rules and in _matches_an_alternative. When every version refuses a copy, the message names all accepted values instead of the first.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:37:33 +01:00
1 parent 3d0ee19bcb
commit 0d21566183
3 files changed
+84 -1

No files matched your search

+5
View File
@@ -98,6 +98,7 @@ from validation import (
validated_choice,
agnostic_substitute,
_build_validation_index,
_parse_validation,
deliverable,
with_archive_members,
extra_alternatives,
@@ -623,6 +624,10 @@ def _matches_an_alternative(fe: dict, local_path: str, profiles: dict) -> bool:
siblings = extra_alternatives(fe, profiles)
if len(siblings) < 2:
return False
# A sibling the code takes without a check (Raze's "BLOOD: Unknown
# Version") accepts whatever copy fills the slot.
if any(not _parse_validation(entry.get("validation")) for entry in siblings):
return True
actual = compute_hashes(local_path, frozenset({"sha1", "md5", "crc32"}))
for entry in siblings:
for algorithm in ("sha1", "md5", "crc32"):