forked from mirrors/nixpkgs
nixos/systemd-boot: fix entry match condition in remove_old_entries
Before this patch, the entry match condition always fails, causing all entries being removed. The error is not noticed because later they are re-generated.
This commit is contained in:
parent
642323930e
commit
437f73dd54
|
@ -185,9 +185,9 @@ def remove_old_entries(gens: List[SystemIdentifier]) -> None:
|
|||
if rex_profile.match(path):
|
||||
prof = rex_profile.sub(r"\1", path)
|
||||
else:
|
||||
prof = "system"
|
||||
prof = None
|
||||
gen_number = int(rex_generation.sub(r"\1", path))
|
||||
if not (prof, gen_number) in gens:
|
||||
if not (prof, gen_number, None) in gens:
|
||||
os.unlink(path)
|
||||
except ValueError:
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue