From df56b037a0d4af7f9a9ee15d86f61e82679948f9 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 14 May 2024 10:46:07 -0400 Subject: [PATCH] boom.bootloader: repair boom entries with mismatched boot_id When loading a boom boot entry from a file name that does not match the boot_id re-write the entry so that it can be manipulated by future invocations of the boom command. Signed-off-by: Bryn M. Reeves --- boom/bootloader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boom/bootloader.py b/boom/bootloader.py index feb669a..095a522 100644 --- a/boom/bootloader.py +++ b/boom/bootloader.py @@ -1494,7 +1494,7 @@ class BootEntry(object): if self.disp_boot_id != match.group(2): _log_info("Entry file name does not match boot_id: %s" % entry_basename) - self.read_only = True + self.update_entry(force=True) self._last_path = entry_file self._unwritten = False @@ -2380,6 +2380,7 @@ class BootEntry(object): # Cache old entry path to_unlink = self._last_path self.write_entry(force=force, expand=expand) + _log_info("Rewrote entry %s as %s", self.disp_boot_id, self._entry_path) if self._entry_path != to_unlink: try: unlink(to_unlink) -- 2.45.2