mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 04:18:52 -06:00
fix: choose a release asset by one rule
resolve_file picked and fetched a release asset in one step, and verify re-derived the choice in pending_release_asset, which refused any record whose size differed from a declared size. fbneo's donpachi, sfz3mix and twotiger samples declare an approximate size with no validation: an online build shipped them while verify reported them missing. release_asset_paths now chooses on the database record under the rules declared_hash_verdict applies to bytes, and both the builder and verify call it. The builder then fetches that revision and holds its bytes to the declaration.
This commit is contained in:
1 parent
dd76142a9c
commit
a39b1c25f3
7 files changed
+154
-108
No files matched your search
@@ -326,7 +326,7 @@ class ExtraResolver:
|
||||
|
||||
def resolve(self, fe: dict, dest: str) -> tuple[str | None, str, str]:
|
||||
"""(local copy or None, resolver status, the core's disagreement)."""
|
||||
from resolve.packfiles import pending_release_asset, resolve_file, run_is_offline
|
||||
from resolve.packfiles import release_asset_paths, resolve_file, run_is_offline
|
||||
from resolve.validation import core_size_refusal, validated_choice
|
||||
|
||||
local_path, status = resolve_file(
|
||||
@@ -340,9 +340,9 @@ class ExtraResolver:
|
||||
):
|
||||
# The asset the online builder fetches in resolve_file. Its record
|
||||
# answers the declaration, and there are no bytes on disk to check.
|
||||
asset = pending_release_asset(fe, self.db)
|
||||
if asset:
|
||||
return asset, "release_asset", ""
|
||||
assets = release_asset_paths(fe, self.db)
|
||||
if assets:
|
||||
return assets[0], "release_asset", ""
|
||||
if status in ("not_found", "external", "user_provided") or not local_path:
|
||||
return None, status, ""
|
||||
# The cores reading a moved layout's file are found under the
|
||||
|
||||
Reference in new issue
Block a user