mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 14:09:17 +03:00
systemd-boot-builder: gracefully ignore errors during entry creation
Catch and ignore errors during writing of the boot entries. These errors could stem from profile names that are not valid filenames on vfat filesystems. fixes #114552
This commit is contained in:
parent
c1180834cf
commit
e2be5dc1f4
1 changed files with 6 additions and 3 deletions
|
@ -222,9 +222,12 @@ def main():
|
|||
gens += get_generations(profile)
|
||||
remove_old_entries(gens)
|
||||
for gen in gens:
|
||||
write_entry(*gen, machine_id)
|
||||
if os.readlink(system_dir(*gen)) == args.default_config:
|
||||
write_loader_conf(*gen)
|
||||
try:
|
||||
write_entry(*gen, machine_id)
|
||||
if os.readlink(system_dir(*gen)) == args.default_config:
|
||||
write_loader_conf(*gen)
|
||||
except OSError as e:
|
||||
print("ignoring profile '{}' in the list of boot entries because of the following error:\n{}".format(profile, e), file=sys.stderr)
|
||||
|
||||
memtest_entry_file = "@efiSysMountPoint@/loader/entries/memtest86.conf"
|
||||
if os.path.exists(memtest_entry_file):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue