mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 10:37:54 -06:00
refactor: read a declaration's slot one way
model.declarations.declared_slot(entry, prefix) is the declared destination less the platform's BIOS root, empty when the entry names no path. platform_declarations, platform_declared_contents, declared_destinations, system_core_reach, find_collisions and platform_claims read it in place of destination-or-name. The core extras of the builder and the manifest read declared_destination, and the builder's case twin list asks Placed.block. Behavior: the 134 EmuDeck system:md5 entries (destination: '') claim no slot. They were filed under their name, sony-playstation:<md5>, a path nothing else names: slots and collisions drop those claims, and case_folded_slots skips an empty slot. Their names and contents still count as declared, in the root folder as before.
This commit is contained in:
1 parent
c2dc50db50
commit
0095b23512
8 files changed
+36
-27
No files matched your search
@@ -14,7 +14,7 @@ from typing import TYPE_CHECKING, TypedDict
|
||||
from model.registry import load_platform_registry
|
||||
from core.hashing import compute_hashes
|
||||
from core.options import reject_unknown
|
||||
from core.paths import EMULATORS_DIR, sanitize_pack_path
|
||||
from core.paths import EMULATORS_DIR, declared_destination, sanitize_pack_path
|
||||
from model.alternatives import core_file_spares
|
||||
from model.declarations import OUTER_ROOTS, declared_root
|
||||
from model.platforms import load_platform_config
|
||||
@@ -833,7 +833,7 @@ class _PlatformPackBuild:
|
||||
|
||||
def _pack_core_file(self, fe: dict) -> None:
|
||||
plan = self.plan
|
||||
dest = sanitize_pack_path(fe.get("destination", fe["name"]))
|
||||
dest = declared_destination(fe)
|
||||
if self._region_dropped(fe):
|
||||
return
|
||||
if not dest:
|
||||
@@ -985,10 +985,8 @@ class _PlatformPackBuild:
|
||||
continue
|
||||
full = extra_full_destination(fe, prefix)
|
||||
if (
|
||||
full and full not in self.placed.destinations and full.lower() in self.placed.lower
|
||||
and self.resolve_extra(
|
||||
fe, sanitize_pack_path(fe.get("destination", fe["name"]))
|
||||
)[0]
|
||||
full and self.placed.block(full) == "case_twin"
|
||||
and self.resolve_extra(fe, declared_destination(fe))[0]
|
||||
):
|
||||
self.case_twins.append(self._flat(full))
|
||||
|
||||
|
||||
Reference in new issue
Block a user