mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-27 14:17:25 -05:00
fix: resolve declarations through one function
verify resolved platform entries with common.resolve_local_file and put the slot override first, and the region pass added a destination hint. packresolve.resolve_declaration now serves the builder, the manifest, verify and the region pass: release assets cached for a file absent from bios/ count as shipped in all four, and a release asset keeps its answer over a slot override.
This commit is contained in:
1 parent
3545c1b333
commit
2af9509ef4
7 files changed
+108
-37
No files matched your search
@@ -936,19 +936,16 @@ def generate_pack(
|
||||
total_files += 1
|
||||
continue
|
||||
|
||||
local_path, status = resolve_file(
|
||||
local_path, status = resolve_declaration(
|
||||
file_entry,
|
||||
db,
|
||||
bios_dir,
|
||||
zip_contents,
|
||||
data_dir_registry=data_registry,
|
||||
data_registry,
|
||||
slot_overrides.get(full_dest),
|
||||
offline=offline,
|
||||
)
|
||||
|
||||
local_path, status = slots.apply_override(
|
||||
slot_overrides.get(full_dest), local_path, status
|
||||
)
|
||||
|
||||
if status == "external":
|
||||
file_ext = os.path.splitext(file_entry["name"])[1] or ""
|
||||
with tempfile.NamedTemporaryFile(
|
||||
@@ -4243,14 +4240,15 @@ def generate_manifest(
|
||||
file_entry: dict, sys_id: str, dest: str, override: str | None
|
||||
) -> tuple[str | None, str]:
|
||||
"""The file served once the slot is settled, or None and why not."""
|
||||
local_path, status = slots.apply_override(override, *resolve_file(
|
||||
local_path, status = resolve_declaration(
|
||||
file_entry,
|
||||
db,
|
||||
bios_dir,
|
||||
zip_contents,
|
||||
data_dir_registry=data_registry,
|
||||
data_registry,
|
||||
override,
|
||||
offline=offline,
|
||||
))
|
||||
)
|
||||
if status == "not_found" and not reads_file_contents(verification_mode):
|
||||
found = agnostic_substitute(file_entry, sys_id, db, manifest_profiles)
|
||||
if found:
|
||||
@@ -4914,6 +4912,7 @@ from packresolve import ( # noqa: E402,F401
|
||||
parse_hash_input,
|
||||
parse_hash_file,
|
||||
lookup_hashes,
|
||||
resolve_declaration,
|
||||
resolve_file,
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user