distro/fedora: only pass kernelName to NewOSPipeline for bootable images

If the image is not bootable it means that we do not need the kernel
version and thus we should not pass it along to `NewOSPipeline`,
because we might not even have a kernel in the package set.
This commit is contained in:
Christian Kellner 2022-06-27 21:27:29 +02:00
parent 49559d53d7
commit 59edcc4a46

View file

@ -201,7 +201,12 @@ func osPipeline(buildPipeline *pipeline.BuildPipeline,
bootLoader = pipeline.BOOTLOADER_GRUB
}
pl := pipeline.NewOSPipeline(buildPipeline, t.rpmOstree, options.OSTree.Parent, repos, packages, pt, bootLoader, t.arch.legacy, c.GetKernel().Name)
var kernelName string
if t.bootable {
kernelName = c.GetKernel().Name
}
pl := pipeline.NewOSPipeline(buildPipeline, t.rpmOstree, options.OSTree.Parent, repos, packages, pt, bootLoader, t.arch.legacy, kernelName)
if t.supportsUEFI() {
pl.UEFIVendor = t.arch.distro.vendor