1
0
Fork 0

fix: use distro equal check

timestamps
dump_stack() 2023-05-23 23:02:09 +00:00
parent 66d45e69d9
commit 77e118be64
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
2 changed files with 10 additions and 7 deletions

View File

@ -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
}

View File

@ -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
}