Merge pull request #114637 from KaiHa/pr/fix-systemd-boot-builder

systemd-boot-builder.py: ignore profile names with invalid chars
This commit is contained in:
Luke Granger-Brown 2021-04-25 11:35:00 +01:00 committed by GitHub
commit 2136e90fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,9 +236,12 @@ def main() -> None:
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):