nixos/systemd-boot-builder: remove old devicetree files (#439585)

This commit is contained in:
Jared Baur
2025-09-03 15:33:13 +01:00
committed by GitHub
@@ -258,6 +258,8 @@ def remove_old_entries(gens: list[SystemIdentifier]) -> None:
bootspec = get_bootspec(gen.profile, gen.generation)
known_paths.append(copy_from_file(bootspec.kernel, True).name)
known_paths.append(copy_from_file(bootspec.initrd, True).name)
if bootspec.devicetree is not None:
known_paths.append(copy_from_file(bootspec.devicetree, True).name)
for path in (BOOT_MOUNT_POINT / "loader/entries").glob("nixos*-generation-[1-9]*.conf", case_sensitive=False):
if rex_profile.match(path.name):
prof = rex_profile.sub(r"\1", path.name)