If a bootable image has not been explicitly requested, don't install
a boot loader if we can't find any kernel images installed in the image.
if state.config.output_format == OutputFormat.cpio and state.config.bootable == ConfigFeature.auto:
return
+ if not any(gen_kernel_images(state)) and state.config.bootable == ConfigFeature.auto:
+ return
+
directory = state.root / "usr/lib/systemd/boot/efi"
if not directory.exists() or not any(directory.iterdir()):
if state.config.bootable == ConfigFeature.enabled: