mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 20:38: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
@@ -155,15 +155,15 @@ class _EmulatorPack:
|
||||
content_ids: dict[str, str | None] = field(default_factory=dict)
|
||||
|
||||
def pending(self, entry: dict, local_path: str | None, status: str) -> tuple[str | None, str]:
|
||||
from resolve.packfiles import pending_release_asset, run_is_offline
|
||||
from resolve.packfiles import release_asset_paths, run_is_offline
|
||||
|
||||
# Read from disk and the cache, as _resolve_for_platform does: a
|
||||
# release asset the cache lacks is fetched by an online build
|
||||
# (generate_emulator_pack resolves with offline=offline).
|
||||
if status in ("not_found", "hash_mismatch") and not run_is_offline():
|
||||
asset = pending_release_asset(entry, self.db)
|
||||
if asset:
|
||||
return asset, RELEASE_ASSET_PENDING
|
||||
assets = release_asset_paths(entry, self.db)
|
||||
if assets:
|
||||
return assets[0], RELEASE_ASSET_PENDING
|
||||
return local_path, status
|
||||
|
||||
def content_id(self, path: str | None) -> str | None:
|
||||
|
||||
Reference in new issue
Block a user