From 59edcc4a46a6a88c6efe50e1ce54bed7ddefad88 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 27 Jun 2022 21:27:29 +0200 Subject: [PATCH] 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. --- internal/distro/fedora/pipelines.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/distro/fedora/pipelines.go b/internal/distro/fedora/pipelines.go index 6d2ef7fdc..db79985ed 100644 --- a/internal/distro/fedora/pipelines.go +++ b/internal/distro/fedora/pipelines.go @@ -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