distro/fedora: image type should be more specific than arch

Currently an image type could override the boot loader in the architecture, but we should
not allow an image type to select a bootloader type the architecture does not support. So
only in case the architecture supports hybrid boot do we allow the image type to select
one of the two types.

This enables UEFI on AMIs for aarch64.
This commit is contained in:
Tom Gundersen 2022-07-05 12:57:11 +01:00
parent c2c43594b1
commit a45caf5756
4 changed files with 15 additions and 1 deletions

View file

@ -649,7 +649,9 @@ func (t *imageType) Exports() []string {
func (t *imageType) getBootType() distro.BootType {
bootType := t.arch.bootType
if t.bootType != distro.UnsetBootType {
bootType = t.bootType
if bootType == distro.HybridBootType {
bootType = t.bootType
}
}
return bootType
}