mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 21:49:34 +03:00
Revert "nixos/systemd-boot: skip EFI update to 252"
This reverts commit 80665d606a
.
Parsing the package version broke our systemd-boot builder test.
i.e. it won't be able to parse systemd-boot efi binaries coming from
ubuntu
We no longer use the faulty systemd-boot version so this code should no
longer be needed.
This commit is contained in:
parent
b7fbd1ffd4
commit
865a2cf8c1
2 changed files with 6 additions and 15 deletions
15
nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
Executable file → Normal file
15
nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
Executable file → Normal file
|
@ -13,7 +13,6 @@ import sys
|
|||
import warnings
|
||||
from typing import NamedTuple
|
||||
|
||||
from packaging import version
|
||||
|
||||
libc = ctypes.CDLL("libc.so.6")
|
||||
|
||||
|
@ -260,18 +259,12 @@ def install_bootloader(args: argparse.Namespace) -> None:
|
|||
if available_match is None:
|
||||
raise Exception("could not determine systemd-boot version")
|
||||
|
||||
installed_version = version.parse(installed_match.group(1))
|
||||
available_version = version.parse(available_match.group(1))
|
||||
installed_version = installed_match.group(1)
|
||||
available_version = available_match.group(1)
|
||||
|
||||
# systemd 252 has a regression that leaves some machines unbootable, so we skip that update.
|
||||
# The fix is in 252.2
|
||||
# See https://github.com/systemd/systemd/issues/25363 and https://github.com/NixOS/nixpkgs/pull/201558#issuecomment-1348603263
|
||||
if installed_version < available_version:
|
||||
if version.parse('252') <= available_version < version.parse('252.2'):
|
||||
print("skipping systemd-boot update to %s because of known regression" % available_version)
|
||||
else:
|
||||
print("updating systemd-boot from %s to %s" % (installed_version, available_version))
|
||||
subprocess.check_call(["@systemd@/bin/bootctl", "--esp-path=@efiSysMountPoint@"] + bootctl_flags + ["update"])
|
||||
print("updating systemd-boot from %s to %s" % (installed_version, available_version))
|
||||
subprocess.check_call(["@systemd@/bin/bootctl", "--esp-path=@efiSysMountPoint@", "update"])
|
||||
|
||||
os.makedirs("@efiSysMountPoint@/efi/nixos", exist_ok=True)
|
||||
os.makedirs("@efiSysMountPoint@/loader/entries", exist_ok=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue