manifest: remove Anaconda pipeline from EFIBootTree

Remove dependence of EFIBootTree pipeline (efiboot-tree) on an Anaconda
pipeline.  The Anaconda pipeline was used to get the product and version
strings, so we pass those in instead.
This way, we an use the pipeline without needing an Anaconda pipeline.
The EFI tree shouldn't depend on an installer (or any) pipeline.
This commit is contained in:
Achilleas Koutsou 2022-11-23 22:09:29 +01:00 committed by Tom Gundersen
parent 2b73a3624c
commit 115c0717c4
3 changed files with 10 additions and 8 deletions

View file

@ -109,7 +109,7 @@ func (img *ImageInstaller) InstantiateManifest(m *manifest.Manifest,
rootfsImagePipeline := manifest.NewISORootfsImg(m, buildPipeline, anacondaPipeline)
rootfsImagePipeline.Size = 4 * common.GibiByte
bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, anacondaPipeline)
bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, img.Product, img.OSVersion)
bootTreePipeline.Platform = img.Platform
bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor()
bootTreePipeline.ISOLabel = isoLabel

View file

@ -86,7 +86,7 @@ func (img *OSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
rootfsImagePipeline := manifest.NewISORootfsImg(m, buildPipeline, anacondaPipeline)
rootfsImagePipeline.Size = 4 * common.GibiByte
bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, anacondaPipeline)
bootTreePipeline := manifest.NewEFIBootTree(m, buildPipeline, img.Product, img.OSVersion)
bootTreePipeline.Platform = img.Platform
bootTreePipeline.UEFIVendor = img.Platform.GetUEFIVendor()
bootTreePipeline.KSPath = kspath

View file

@ -13,7 +13,8 @@ type EFIBootTree struct {
Platform platform.Platform
anacondaPipeline *Anaconda
product string
version string
UEFIVendor string
ISOLabel string
@ -22,10 +23,11 @@ type EFIBootTree struct {
KernelOpts []string
}
func NewEFIBootTree(m *Manifest, buildPipeline *Build, anacondaPipeline *Anaconda) *EFIBootTree {
func NewEFIBootTree(m *Manifest, buildPipeline *Build, product, version string) *EFIBootTree {
p := &EFIBootTree{
Base: NewBase(m, "efiboot-tree", buildPipeline),
anacondaPipeline: anacondaPipeline,
Base: NewBase(m, "efiboot-tree", buildPipeline),
product: product,
version: version,
}
buildPipeline.addDependent(p)
m.addPipeline(p)
@ -59,8 +61,8 @@ func (p *EFIBootTree) serialize() osbuild.Pipeline {
grubOptions := &osbuild.GrubISOStageOptions{
Product: osbuild.Product{
Name: p.anacondaPipeline.product,
Version: p.anacondaPipeline.version,
Name: p.product,
Version: p.version,
},
Kernel: osbuild.ISOKernel{
Dir: "/images/pxeboot",