refactor: read hashes and the registry one way

Hash fields go through core.hashing.parse_hash_list, which also splits comma-joined list items: the truth model compared a comma-joined sha256 list as one value. _registry.yml goes through load_platform_registry (required= where an absent file must stop the run), database.json through load_database, file and member digests through file_digest and stream_hashes. download.py and check_release read SHA256SUMS.txt with one parser: a sha256sum -b line matched nothing in download.py and the pack went unchecked.
This commit is contained in:
Abdessamad Derraz committed 2026-11-20 18:28:40 +01:00
1 parent 7cd499531d
commit 348d5b51c3
32 files changed
+130 -217

No files matched your search

+2 -3
View File
@@ -6,6 +6,7 @@ import re
import urllib.parse
from collections.abc import Callable
from model.database import load_database
from model import siteinputs
from sitegen import markup
from core.paths import REPO_ROOT
@@ -418,7 +419,6 @@ def _build_boards() -> None:
def _read_arcade_source() -> tuple[dict, dict] | None:
"""The profiles and database of the repository, None without a database."""
import json
from model.profiles import load_emulator_profiles
@@ -426,8 +426,7 @@ def _read_arcade_source() -> tuple[dict, dict] | None:
database = inputs.db
if not database.exists():
return None
with open(database, encoding="utf-8") as handle:
db = json.load(handle)
db = load_database(str(database))
profiles = load_emulator_profiles(str(inputs.emulators), skip_aliases=False)
return profiles, db