fix: list a pending release asset as packed

verify counted it OK but kept its path out of pack_destinations, so an
online step 5 reported the fetched file as pack only (finding 1).
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 11:54:42 +01:00
1 parent 25b5523024
commit 71020c3974
2 files changed
+11 -1

No files matched your search

+5 -1
View File
@@ -1309,8 +1309,12 @@ def verify_platform(
"release_asset": local_path,
"reason": "release asset, fetched when the pack is built",
}
# Written at its path like any held file: keyed to None, it
# stayed out of pack_destinations and step 5 read the pack's
# copy as a file only the pack holds.
packed_order.append((
sys_id, f"{base_dest}/{destination}" if base_dest else destination, None,
sys_id, f"{base_dest}/{destination}" if base_dest else destination,
local_path,
))
shipped_keys.add(_dest_key(file_entry, sys_id))
local_path = None
+6
View File
@@ -89,6 +89,12 @@ class ReleaseAssetNotCached(unittest.TestCase):
self.assertEqual(entry["status"], Status.OK)
self.assertEqual(entry["release_asset"], REGISTERED[0])
def test_its_path_is_a_pack_destination(self):
"""The pack holds the fetched file at its path: absent from
pack_destinations, step 5 reported it 'pack only'."""
report = verify_platform(self.config, self.db, "emulators", {})
self.assertIn("big.bin", report["pack_destinations"])
def test_offline_counts_it_missing(self):
packresolve.set_offline(True)
self.assertEqual(self._entry()["status"], Status.MISSING)