mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 21:43:23 -05:00
fix: carry identity in extras, refile rom b
This commit is contained in:
1 parent
93f3560d19
commit
b2e488e0a4
5 files changed
+86
-2
No files matched your search
@@ -1298,6 +1298,16 @@ def runs_standalone(
|
||||
)
|
||||
|
||||
|
||||
# What identifies a profile entry's content, carried unchanged wherever the
|
||||
# entry travels (cross-reference report, core extras, second-pass copies).
|
||||
# Each copy once kept its own subset: np2kai's bios.rom lost min_size and
|
||||
# validation on the way and resolved to an IBM PCjr ROM of the same name.
|
||||
PROFILE_IDENTITY_FIELDS = (
|
||||
"sha1", "md5", "sha256", "crc32", "size", "min_size", "max_size",
|
||||
"validation", "aliases", "unsourceable",
|
||||
)
|
||||
|
||||
|
||||
def upstream_profile_index(
|
||||
profiles: dict[str, dict], include_aliases: bool = False
|
||||
) -> dict[str, set[str]]:
|
||||
|
||||
@@ -6,6 +6,7 @@ this module builds so the report and the pack withdraw the same files."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from common import PROFILE_IDENTITY_FIELDS
|
||||
from common import expand_platform_declared_names
|
||||
from common import load_emulator_profiles
|
||||
from common import resolution_is_hash_exact
|
||||
@@ -442,7 +443,7 @@ def _collect_emulator_extras(
|
||||
# validation block; dropping those fields here would let a same-named
|
||||
# but different payload enter a generated pack.
|
||||
expected = u.get("expected") or {}
|
||||
for identity in ("sha1", "md5", "sha256", "crc32", "size"):
|
||||
for identity in PROFILE_IDENTITY_FIELDS:
|
||||
declared = u.get(identity)
|
||||
if declared in (None, "", []):
|
||||
declared = expected.get(identity)
|
||||
@@ -527,7 +528,7 @@ def _collect_emulator_extras(
|
||||
# The same identity the first pass carries: without it the copy
|
||||
# resolves on its name alone and a same-named file of another
|
||||
# game fills the slot the profile marks as not held.
|
||||
for identity in ("sha1", "md5", "sha256", "crc32", "size", "unsourceable"):
|
||||
for identity in PROFILE_IDENTITY_FIELDS:
|
||||
if f.get(identity) not in (None, "", []):
|
||||
extra[identity] = f[identity]
|
||||
extras.append(extra)
|
||||
|
||||
@@ -34,6 +34,7 @@ import slots
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from common import (
|
||||
PROFILE_IDENTITY_FIELDS,
|
||||
build_target_cores_cache,
|
||||
build_zip_contents_index,
|
||||
check_inside_zip,
|
||||
@@ -602,6 +603,11 @@ def find_undeclared_files(
|
||||
"checks": sorted(checks) if checks else [],
|
||||
"source_ref": f.get("source_ref"),
|
||||
"expected": _build_expected(f, checks),
|
||||
**{
|
||||
field: f.get(field)
|
||||
for field in PROFILE_IDENTITY_FIELDS
|
||||
if f.get(field) not in (None, "", [])
|
||||
},
|
||||
"sha1": f.get("sha1"),
|
||||
"md5": f.get("md5"),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user