From a05b1da9a0557653a9404bef754f39470958e702 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Thu, 5 Nov 2026 19:30:29 +0100 Subject: [PATCH] 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. --- scripts/auto_fetch.py | 5 ++++- tests/test_audit_regressions.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/auto_fetch.py b/scripts/auto_fetch.py index 609160a6c..8db87d9ac 100644 --- a/scripts/auto_fetch.py +++ b/scripts/auto_fetch.py @@ -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"], diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index 3cc9cd6cf..fbb7afeff 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -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):