nixos/systemd-boot-builder: remove old devicetree files
I just stumbled across this during code inspection. I haven't tested this at all.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user