fix: write a mame pin move with no set change

diff_mame now reports the core_version and upstream_commit that
merge_mame_profile writes, both read from mame_pin. A release that
changes no BIOS root set still moves the pin, so the profile is written
and the device sets follow the new release.
This commit is contained in:
Abdessamad Derraz committed 2026-11-24 02:18:40 +01:00
1 parent f46f3d9990
commit 17c64914ef
4 files changed
+83 -15

No files matched your search

+5 -2
View File
@@ -176,12 +176,15 @@ def _format_diff(
removed = diff.get("removed", [])
unchanged = diff.get("unchanged", 0)
if not added and not updated and not removed:
pin = diff.get("pin", {})
if not added and not updated and not removed and not pin:
lines.append(f" {name}:")
lines.append(" no changes")
return lines
lines.append(f" {name}:")
lines.extend(f" ^ {field} moves from {old} to {new}" for field, (old, new) in pin.items())
if show_added:
bios_sets = hashes.get("bios_sets", {})
@@ -272,7 +275,7 @@ def _run(args: argparse.Namespace) -> None:
if not args.dry_run:
updated = diff.get("updated", [])
added = diff.get("added", []) if is_main else []
if added or updated:
if added or updated or diff.get("pin"):
write_mame_profile(
profile_path, merge_mame_profile(profile, hashes, add_new=is_main),
)