fix: report a contradicted hash on an archive too

This commit is contained in:
Abdessamad Derraz committed 2026-09-06 23:08:04 +02:00
1 parent 8128b47aeb
commit a61c800462
2 files changed
+95 -2

No files matched your search

+14 -2
View File
@@ -1402,7 +1402,7 @@ def verify_emulator(
),
{"name": archive},
)
local_path, _ = resolve_local_file(
local_path, resolve_status = resolve_local_file(
archive_entry,
db,
zip_contents,
@@ -1412,7 +1412,19 @@ def verify_emulator(
f.get("archive") == archive and f.get("required", True)
for f in files
)
if local_path:
if local_path and resolve_status == "hash_mismatch":
# Same policy as the loose-file branch below: the name
# matched while the bytes contradict the hash the profile
# declares on the container. Reporting it covered says the
# collection holds an archive it does not.
result = {
"name": archive,
"status": Status.UNTESTED,
"required": required,
"path": local_path,
"reason": "declared hash contradicted by the local file",
}
elif local_path:
result = {
"name": archive,
"status": Status.OK,