mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-13 21:43:55 -06:00
chore: merge tooling batch
This commit is contained in:
commit
b90f8bb0b9
116 files changed
+12868
-9741
No files matched your search
+18
-4
@@ -257,11 +257,27 @@ class ExtraResolver:
|
||||
# verify's replay: never downloads, and counts the release asset an
|
||||
# online build fetches, as it does for a platform entry.
|
||||
self.pending_assets = pending_assets
|
||||
# Each profile's entries by slot, built on first use: every extra
|
||||
# scanned its whole profile, 33 million entries in one verify --all.
|
||||
self._slots: dict[str, dict[tuple[str, str], list[dict]]] = {}
|
||||
|
||||
def alternatives(self, fe: dict) -> list[dict]:
|
||||
"""The versions the extra's own profile accepts at its slot, as
|
||||
validation.extra_alternatives finds them."""
|
||||
from validation import slot_index
|
||||
|
||||
key = fe.get("source_profile") or ""
|
||||
index = self._slots.get(key)
|
||||
if index is None:
|
||||
profile = (self.profiles or {}).get(key, {})
|
||||
index = self._slots[key] = slot_index(profile.get("files") or [])
|
||||
name = fe.get("source_name") or fe.get("name", "")
|
||||
return index.get((name, fe.get("source_path") or name), [])
|
||||
|
||||
def resolve(self, fe: dict, dest: str) -> tuple[str | None, str, str]:
|
||||
"""(local copy or None, resolver status, the core's disagreement)."""
|
||||
from packresolve import pending_release_asset, resolve_file, run_is_offline
|
||||
from validation import core_size_refusal, extra_alternatives, validated_choice
|
||||
from validation import core_size_refusal, validated_choice
|
||||
|
||||
local_path, status = resolve_file(
|
||||
fe, self.db, self.bios_dir, self.zip_contents,
|
||||
@@ -285,9 +301,7 @@ class ExtraResolver:
|
||||
)
|
||||
# The platform never reads the bytes, the core does: a copy it turns
|
||||
# away by its own size check is not its file, on any platform.
|
||||
if core_size_refusal(
|
||||
fe, local_path, extra_alternatives(fe, self.profiles)
|
||||
):
|
||||
if core_size_refusal(fe, local_path, self.alternatives(fe)):
|
||||
return None, "not_found", ""
|
||||
return local_path, status, disagreement
|
||||
|
||||
|
||||
Reference in new issue
Block a user