manifest: rename ISOTree to AnacondaISOTree

The ISOTree struct and pipeline generator is specific to Anaconda.
Rename it for clarity and to differentiate from any other ISO tree
pipeline.
This commit is contained in:
Achilleas Koutsou 2022-11-25 20:15:24 +01:00 committed by Tom Gundersen
parent 3d1f283dab
commit fae824d574
3 changed files with 10 additions and 10 deletions

View file

@ -123,7 +123,7 @@ func (img *ImageInstaller) InstantiateManifest(m *manifest.Manifest,
osPipeline.Environment = img.Environment osPipeline.Environment = img.Environment
osPipeline.Workload = img.Workload osPipeline.Workload = img.Workload
isoTreePipeline := manifest.NewISOTree(m, isoTreePipeline := manifest.NewAnacondaISOTree(m,
buildPipeline, buildPipeline,
anacondaPipeline, anacondaPipeline,
rootfsImagePipeline, rootfsImagePipeline,

View file

@ -92,7 +92,7 @@ func (img *OSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
bootTreePipeline.KSPath = kspath bootTreePipeline.KSPath = kspath
bootTreePipeline.ISOLabel = isoLabel bootTreePipeline.ISOLabel = isoLabel
isoTreePipeline := manifest.NewISOTree(m, isoTreePipeline := manifest.NewAnacondaISOTree(m,
buildPipeline, buildPipeline,
anacondaPipeline, anacondaPipeline,
rootfsImagePipeline, rootfsImagePipeline,

View file

@ -10,11 +10,11 @@ import (
"github.com/osbuild/osbuild-composer/internal/users" "github.com/osbuild/osbuild-composer/internal/users"
) )
// An ISOTree represents a tree containing the anaconda installer, // An AnacondaISOTree represents a tree containing the anaconda installer,
// configuration in terms of a kickstart file, as well as an embedded // configuration in terms of a kickstart file, as well as an embedded
// payload to be installed, this payload can either be an ostree // payload to be installed, this payload can either be an ostree
// CommitSpec or OSPipeline for an OS. // CommitSpec or OSPipeline for an OS.
type ISOTree struct { type AnacondaISOTree struct {
Base Base
// TODO: review optional and mandatory fields and their meaning // TODO: review optional and mandatory fields and their meaning
@ -48,14 +48,14 @@ type ISOTree struct {
KernelOpts []string KernelOpts []string
} }
func NewISOTree(m *Manifest, func NewAnacondaISOTree(m *Manifest,
buildPipeline *Build, buildPipeline *Build,
anacondaPipeline *Anaconda, anacondaPipeline *Anaconda,
rootfsPipeline *ISORootfsImg, rootfsPipeline *ISORootfsImg,
bootTreePipeline *EFIBootTree, bootTreePipeline *EFIBootTree,
isoLabel string) *ISOTree { isoLabel string) *AnacondaISOTree {
p := &ISOTree{ p := &AnacondaISOTree{
Base: NewBase(m, "bootiso-tree", buildPipeline), Base: NewBase(m, "bootiso-tree", buildPipeline),
anacondaPipeline: anacondaPipeline, anacondaPipeline: anacondaPipeline,
rootfsPipeline: rootfsPipeline, rootfsPipeline: rootfsPipeline,
@ -71,7 +71,7 @@ func NewISOTree(m *Manifest,
} }
// Return the ostree commit URL and checksum that will be included in this // Return the ostree commit URL and checksum that will be included in this
func (p *ISOTree) getOSTreeCommits() []ostree.CommitSpec { func (p *AnacondaISOTree) getOSTreeCommits() []ostree.CommitSpec {
if p.OSTree == nil { if p.OSTree == nil {
return nil return nil
} }
@ -81,7 +81,7 @@ func (p *ISOTree) getOSTreeCommits() []ostree.CommitSpec {
} }
} }
func (p *ISOTree) getBuildPackages() []string { func (p *AnacondaISOTree) getBuildPackages() []string {
packages := []string{ packages := []string{
"squashfs-tools", "squashfs-tools",
} }
@ -97,7 +97,7 @@ func (p *ISOTree) getBuildPackages() []string {
return packages return packages
} }
func (p *ISOTree) serialize() osbuild.Pipeline { func (p *AnacondaISOTree) serialize() osbuild.Pipeline {
// We need one of two payloads // We need one of two payloads
if p.OSTree == nil && p.OSPipeline == nil { if p.OSTree == nil && p.OSPipeline == nil {
panic("missing ostree or ospipeline parameters in ISO tree pipeline") panic("missing ostree or ospipeline parameters in ISO tree pipeline")