fix: count a core file only where it is packed

verify kept its own copy of the placement rule and missed the flat RomM folder, so the report still counted 543 unreachable files as packed. It now asks the builder's ExtraPlacement. The README fraction counted every held core file, including those a platform cannot place or that a same-named packed file hides. It now counts what the pack holds.
This commit is contained in:
Abdessamad Derraz committed 2026-10-19 07:44:12 +02:00
1 parent 7d1e9f8816
commit 53f9746bfa
5 files changed
+83 -35

No files matched your search

+11 -2
View File
@@ -762,15 +762,24 @@ def find_exclusion_notes(
# Platform verification
_UNPLACED_REASONS = {
"no_platform_slug": "no platform slug for its system",
"below_platform_folder": "below the folder the platform lists",
}
def _mark_unplaced(config: dict, undeclared: list[dict], profiles: dict) -> None:
"""What the builder cannot place is not in the pack, held or not."""
from packextras import unplaceable_extras
unplaced = unplaceable_extras(config, undeclared, profiles)
for u in undeclared:
if (u.get("emulator", ""), u.get("name", ""), u.get("path") or "") in unplaced:
reason = unplaced.get(
(u.get("emulator", ""), u.get("name", ""), u.get("path") or "")
)
if reason:
u["in_pack"] = False
u["omitted"] = "no platform slug for its system"
u["omitted"] = _UNPLACED_REASONS[reason]
_HIDDEN_REASONS = {