fix: report an archive another profile masks

This commit is contained in:
Abdessamad Derraz committed 2026-10-18 13:00:38 +02:00
1 parent 39237004db
commit bfa6c51ff5
3 files changed
+86 -6

No files matched your search

+12 -5
View File
@@ -1444,11 +1444,6 @@ def generate_emulator_pack(
archive_name, archive_prefix, pack_structure, standalone
)
if archive_dest.lower() in seen_lower:
continue
if _has_path_conflict(archive_dest, seen_destinations, seen_parents):
continue
own_entry = archive_entry(archive_name, files)
if required_only and _archive_is_optional(own_entry, archive_name, files):
continue
@@ -1460,6 +1455,18 @@ def generate_emulator_pack(
data_dir_registry=data_registry,
offline=offline,
)
taken = archive_dest.lower() in seen_lower
if taken or _has_path_conflict(archive_dest, seen_destinations, seen_parents):
# Another profile's file holds this path. The same archive
# asked for twice is served; anything else leaves this
# profile without its archive, which used to pass in
# silence: a neocdz.zip lacking 000-lo.lo shipped as the
# one the second core needs.
if not (taken and local_path and _same_bytes(
local_path, packed_at.get(archive_dest.lower())
)):
report_missing(archive_name, archive_dest)
continue
if local_path and status not in ("not_found",):
if local_path.endswith(".zip"):
_add_zip_to_pack(local_path, archive_dest, zf, own_entry)
+14 -1
View File
@@ -1688,7 +1688,20 @@ def verify_emulator(
archive, profile.get("archive_prefix", ""),
profile.get("pack_structure"), standalone,
)
if local_path:
block = placement_block(
dest, placed_files, set(placed), placed_parents, True
)
if block and local_path and result["status"] != Status.MISSING:
other_path, owner, other_dest = placed.get(dest.lower(), (None, "", ""))
if block == "path_conflict" or content_id(local_path) != content_id(other_path):
# The pack serves the other profile's file here: this
# archive is not in it, whatever this profile resolves.
result["status"] = Status.MISSING
result["reason"] = (
"a packed file occupies its directory" if block == "path_conflict"
else f"the pack holds {owner}'s {other_dest} at this path"
)
elif local_path:
occupy(dest, local_path, emu_name)
dest_to_name[dest] = archive
cur = result["status"]