fix: name why an external download failed

download_external returns an ExternalFetch outcome instead of printing and returning a bare bool, so the pack report names the real cause. lookup_hashes resolves offline and counts a release asset as held without downloading it.
This commit is contained in:
Abdessamad Derraz committed 2026-11-23 21:02:46 +01:00
1 parent 5b3f0c3f4c
commit d6abe6fd95
4 files changed
+111 -40

No files matched your search

+6 -3
View File
@@ -324,9 +324,12 @@ class _EmulatorPackBuild:
try:
# Built in memory, nothing is fetched: verify --emulator
# cannot fetch either and reports the file missing.
if self.record is None and download_external(fe, tmp_path):
self._add(tmp_path, dest, None)
return (alternatives, True, None)
if self.record is None:
fetch = download_external(fe, tmp_path)
if fetch.fetched:
self._add(tmp_path, dest, None)
return (alternatives, True, None)
self.progress(f" WARNING: {fe['name']}: {fetch.reason}")
return (alternatives, False, functools.partial(
self.missing_files.append, fe["name"]
))