fix: count a core's release asset as packed

verify replayed the core extras offline: a release asset an online
build fetched and packed took no path in its report (finding 2).
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 11:55:53 +01:00
1 parent 71020c3974
commit dde6229775
3 files changed
+68 -2

No files matched your search

+14 -1
View File
@@ -244,6 +244,7 @@ class ExtraResolver:
offline: bool | None = True,
*,
profiles: dict,
pending_assets: bool = False,
) -> None:
self.profiles = profiles
self.db = db
@@ -253,10 +254,13 @@ class ExtraResolver:
self.validation_index = validation_index
self.validation_owners = validation_owners
self.offline = offline
# 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
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 resolve_file
from packresolve import pending_release_asset, resolve_file, run_is_offline
from validation import core_size_refusal, extra_alternatives, validated_choice
local_path, status = resolve_file(
@@ -264,6 +268,15 @@ class ExtraResolver:
dest_hint=fe.get("destination", ""),
data_dir_registry=self.data_registry, offline=self.offline,
)
if (
self.pending_assets and status in ("not_found", "hash_mismatch")
and not run_is_offline()
):
# 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", ""
if status in ("not_found", "external", "user_provided") or not local_path:
return None, status, ""
local_path, disagreement = validated_choice(
+1 -1
View File
@@ -1463,7 +1463,7 @@ def verify_platform(
region_drops, report_for_builder,
ExtraResolver(
db, DEFAULT_BIOS_DIR, zip_contents, data_dir_registry, validation_index,
validation_owners, profiles=profiles,
validation_owners, profiles=profiles, pending_assets=True,
),
placed_kind,
system_filter,