1
0
Fork 0

fix: correct support for empty release

timestamps
dump_stack() 2023-05-25 10:25:26 +00:00
parent 6db5ffc8c2
commit b631767d98
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
1 changed files with 8 additions and 3 deletions

View File

@ -168,9 +168,14 @@ 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
if km.Distro.Release == "" {
if ki.Distro.ID != km.Distro.ID {
return
}
} else {
if !ki.Distro.Equal(km.Distro) {
return
}
}
supported, err = regexp.MatchString(km.Kernel.Regex, ki.KernelRelease)