distro: replace BootPartition() with FindMountable("/boot")
RootParition() and BootPartition() methods have been removed.
This commit is contained in:
parent
3f38602896
commit
890f380384
5 changed files with 4 additions and 18 deletions
|
|
@ -95,20 +95,6 @@ func (pt *PartitionTable) FindPartitionForMountpoint(mountpoint string) *Partiti
|
|||
return nil
|
||||
}
|
||||
|
||||
// Returns the root partition (the partition whose filesystem has / as
|
||||
// a mountpoint) of the partition table. Nil is returned if there's no such
|
||||
// partition.
|
||||
func (pt *PartitionTable) RootPartition() *Partition {
|
||||
return pt.FindPartitionForMountpoint("/")
|
||||
}
|
||||
|
||||
// Returns the /boot partition (the partition whose filesystem has /boot as
|
||||
// a mountpoint) of the partition table. Nil is returned if there's no such
|
||||
// partition.
|
||||
func (pt *PartitionTable) BootPartition() *Partition {
|
||||
return pt.FindPartitionForMountpoint("/boot")
|
||||
}
|
||||
|
||||
// Returns the index of the boot partition: the partition whose filesystem has
|
||||
// /boot as a mountpoint. If there is no explicit boot partition, the root
|
||||
// partition is returned.
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ func ec2BaseTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec,
|
|||
p.AddStage(osbuild.NewRPMStage(rpmStageOptions(repos), osbuild.NewRpmStageSourceFilesInputs(packages)))
|
||||
|
||||
// If the /boot is on a separate partition, the prefix for the BLS stage must be ""
|
||||
if pt.BootPartition() == nil {
|
||||
if pt.FindMountable("/boot") == nil {
|
||||
p.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{}))
|
||||
} else {
|
||||
p.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{Prefix: common.StringToPtr("")}))
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ func osPipeline(t *imageType,
|
|||
p.AddStage(osbuild.NewRPMStage(rpmStageOptions(repos), osbuild.NewRpmStageSourceFilesInputs(packages)))
|
||||
|
||||
// If the /boot is on a separate partition, the prefix for the BLS stage must be ""
|
||||
if pt == nil || pt.BootPartition() == nil {
|
||||
if pt == nil || pt.FindMountable("/boot") == nil {
|
||||
p.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{}))
|
||||
} else {
|
||||
p.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{Prefix: common.StringToPtr("")}))
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ func osPipeline(t *imageType,
|
|||
p.AddStage(osbuild.NewRPMStage(rpmStageOptions(repos), osbuild.NewRpmStageSourceFilesInputs(packages)))
|
||||
|
||||
// If the /boot is on a separate partition, the prefix for the BLS stage must be ""
|
||||
if pt == nil || pt.BootPartition() == nil {
|
||||
if pt == nil || pt.FindMountable("/boot") == nil {
|
||||
p.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{}))
|
||||
} else {
|
||||
p.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{Prefix: common.StringToPtr("")}))
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ func ec2BaseTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpec,
|
|||
p.AddStage(osbuild.NewRPMStage(rpmStageOptions(repos), osbuild.NewRpmStageSourceFilesInputs(packages)))
|
||||
|
||||
// If the /boot is on a separate partition, the prefix for the BLS stage must be ""
|
||||
if pt.BootPartition() == nil {
|
||||
if pt.FindMountable("/boot") == nil {
|
||||
p.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{}))
|
||||
} else {
|
||||
p.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{Prefix: common.StringToPtr("")}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue