mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 10:37:54 -06:00
refactor: place every file through Placed
data_directory_members, pack_data_tree and manifest_core_entries take the Placed record instead of three loose sets and a fold flag, and verify's replay of the builder (_builder_placement), hidden_extras and the emulator pack check keep a Placed of their own. hidden_extras records the sha1 at each taken path through the new Placed content option, which keeps its same-content case twin rule. No behavior change.
This commit is contained in:
1 parent
899f591575
commit
ca3ff1d4c5
15 files changed
+62
-97
No files matched your search
@@ -156,25 +156,18 @@ def _builder_placement(
|
||||
path -> copy or None for each slot kept, a user_provided or external one
|
||||
included).
|
||||
"""
|
||||
from packs.paths import has_path_conflict, register_path
|
||||
from packs.archive import Placed
|
||||
|
||||
shipped: dict[str, str] = {}
|
||||
occupied: dict[str, str | None] = {}
|
||||
seen: set[str] = set()
|
||||
folded: set[str] = set()
|
||||
parents: set[str] = set()
|
||||
placed = Placed(case_insensitive)
|
||||
for _sys_id, full, local in sorted(packed_order, key=lambda item: item[0]):
|
||||
# EmuDeck's system:md5 entries name no file: the builder writes none.
|
||||
if not full or full.endswith("/"):
|
||||
continue
|
||||
if (
|
||||
full in occupied
|
||||
or (case_insensitive and full.lower() in folded)
|
||||
or has_path_conflict(full, seen, parents)
|
||||
):
|
||||
if placed.block(full):
|
||||
continue
|
||||
register_path(full, seen, parents)
|
||||
folded.add(full.lower())
|
||||
placed.take(full)
|
||||
occupied[full] = local
|
||||
if local is not None:
|
||||
shipped[full] = local
|
||||
|
||||
Reference in new issue
Block a user