systemd-boot-builder: use regex prefix string

otherwise there are warnings for \.
This commit is contained in:
Jörg Thalheim 2023-08-26 18:39:46 +02:00 committed by Jörg Thalheim
parent 5ee9fdf929
commit b7fbd1ffd4

View File

@ -179,8 +179,8 @@ def get_specialisations(profile: str | None, generation: int, _: str | None) ->
def remove_old_entries(gens: list[SystemIdentifier]) -> None:
rex_profile = re.compile("^@efiSysMountPoint@/loader/entries/nixos-(.*)-generation-.*\.conf$")
rex_generation = re.compile("^@efiSysMountPoint@/loader/entries/nixos.*-generation-([0-9]+)(-specialisation-.*)?\.conf$")
rex_profile = re.compile(r"^@efiSysMountPoint@/loader/entries/nixos-(.*)-generation-.*\.conf$")
rex_generation = re.compile(r"^@efiSysMountPoint@/loader/entries/nixos.*-generation-([0-9]+)(-specialisation-.*)?\.conf$")
known_paths = []
for gen in gens:
known_paths.append(copy_from_profile(*gen, "kernel", True))