1
0

fix: correct support for empty release

This commit is contained in:
dump_stack() 2023-05-25 10:25:26 +00:00
parent 6db5ffc8c2
commit b631767d98
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -168,10 +168,15 @@ type Artifact struct {
func (ka Artifact) checkSupport(ki distro.KernelInfo, km Target) ( func (ka Artifact) checkSupport(ki distro.KernelInfo, km Target) (
supported bool, err error) { supported bool, err error) {
if km.Distro.Release == "" {
if ki.Distro.ID != km.Distro.ID { if ki.Distro.ID != km.Distro.ID {
supported = false
return return
} }
} else {
if !ki.Distro.Equal(km.Distro) {
return
}
}
supported, err = regexp.MatchString(km.Kernel.Regex, ki.KernelRelease) supported, err = regexp.MatchString(km.Kernel.Regex, ki.KernelRelease)
return return