summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorlewo <lewo@abesis.fr>2023-04-16 22:17:28 +0200
committerGitHub <noreply@github.com>2023-04-16 22:17:28 +0200
commitff24a05847080bf4edbbebae6c04eb5da4bb97d1 (patch)
treeabdeb6f846f1972974c9a339bd84061abb9f79a7 /nixos
parent6a35d59f94bd4d37bc639493658f77b6be4975d2 (diff)
parent2638fb722ec78b51695b6be2aa5affef97263c4c (diff)
Merge pull request #206445 from nlewo/ssytemd-boot-fail
systemd-boot-builder only ignores OSError "invalid argument"
Diffstat (limited to 'nixos')
-rwxr-xr-xnixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
index c92451997203..a040518a5a57 100755
--- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
+++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
@@ -302,8 +302,12 @@ def main() -> None:
if is_default:
write_loader_conf(*gen)
except OSError as e:
- profile = f"profile '{gen.profile}'" if gen.profile else "default profile"
- print("ignoring {} in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr)
+ # See https://github.com/NixOS/nixpkgs/issues/114552
+ if e.errno == errno.EINVAL:
+ profile = f"profile '{gen.profile}'" if gen.profile else "default profile"
+ print("ignoring {} in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr)
+ else:
+ raise e
for root, _, files in os.walk('@efiSysMountPoint@/efi/nixos/.extra-files', topdown=False):
relative_root = root.removeprefix("@efiSysMountPoint@/efi/nixos/.extra-files").removeprefix("/")