lol

Merge pull request #206445 from nlewo/ssytemd-boot-fail

systemd-boot-builder only ignores OSError "invalid argument"

authored by

lewo and committed by
GitHub
ff24a058 6a35d59f

+6 -2
+6 -2
nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
··· 302 302 if is_default: 303 303 write_loader_conf(*gen) 304 304 except OSError as e: 305 - profile = f"profile '{gen.profile}'" if gen.profile else "default profile" 306 - print("ignoring {} in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr) 305 + # See https://github.com/NixOS/nixpkgs/issues/114552 306 + if e.errno == errno.EINVAL: 307 + profile = f"profile '{gen.profile}'" if gen.profile else "default profile" 308 + print("ignoring {} in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr) 309 + else: 310 + raise e 307 311 308 312 for root, _, files in os.walk('@efiSysMountPoint@/efi/nixos/.extra-files', topdown=False): 309 313 relative_root = root.removeprefix("@efiSysMountPoint@/efi/nixos/.extra-files").removeprefix("/")