fix: use distro equal check
This commit is contained in:
parent
66d45e69d9
commit
77e118be64
@ -168,13 +168,7 @@ type Artifact struct {
|
||||
func (ka Artifact) checkSupport(ki distro.KernelInfo, km Target) (
|
||||
supported bool, err error) {
|
||||
|
||||
if ki.Distro.ID != km.Distro.ID {
|
||||
supported = false
|
||||
return
|
||||
}
|
||||
|
||||
// DistroRelease is optional
|
||||
if km.Distro.Release != "" && ki.Distro.Release != km.Distro.Release {
|
||||
if !ki.Distro.Equal(km.Distro) {
|
||||
supported = false
|
||||
return
|
||||
}
|
||||
|
@ -75,3 +75,12 @@ func (d Distro) Kernels() (kernels []KernelInfo, err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (d Distro) Equal(to Distro) bool {
|
||||
for _, dd := range distros {
|
||||
if dd.Equal(d) {
|
||||
return dd.Equal(to)
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user