fix: leave bundled files out of auto_fetch targets

find_missing kept undeclared files reached only by bundled entries, so auto_fetch searched for and offered files the emulator installs itself, and a placed copy would fail bundled_only.py --strict. RetroPie drops from 55 to 14 missing files.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:30:29 +01:00
1 parent f9a786896e
commit a05b1da9a0
2 files changed
+8 -1

No files matched your search

+4 -1
View File
@@ -107,7 +107,10 @@ def find_missing(config: dict, db: dict) -> list[dict]:
"destination": file_entry.get("destination", name),
})
for u in result["undeclared_files"]:
if u.get("in_repo") or not u.get("required"):
# A file installed with its emulator is not an acquisition target:
# verify leaves it out of the missing count, and bundled_only.py
# --strict refuses a copy that only bundled entries reach.
if u.get("in_repo") or not u.get("required") or u.get("bundled"):
continue
missing.append({
"name": u["name"],
+4
View File
@@ -4224,6 +4224,10 @@ class AutoFetchAsksVerifyWhatIsMissing(unittest.TestCase):
"system": "diablo", "emulator": "DevilutionX"},
{"name": "held.bin", "in_repo": True, "required": True},
{"name": "extra.bin", "in_repo": False, "required": False},
# zesarux installs 128s.rom with the emulator: not a target,
# and a copy placed in bios/ fails pipeline step 4d.
{"name": "128s.rom", "in_repo": False, "required": True,
"bundled": True, "emulator": "ZEsarUX"},
],
}
with mock.patch.object(verify_mod, "verify_platform", lambda c, d: result):