fix: remove type from kernel release
This commit is contained in:
parent
41c4241d75
commit
56faf1a351
@ -96,7 +96,17 @@ func (suse OpenSUSE) Kernels() (kernels []distro.KernelInfo, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
return c.Kernels()
|
||||
kernels, err = c.Kernels()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for i := range kernels {
|
||||
kernels[i].KernelRelease = strings.Replace(
|
||||
kernels[i].KernelRelease, "-default", "", -1)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (suse OpenSUSE) envs() (envs []string) {
|
||||
|
@ -107,6 +107,8 @@ func (cmd *KernelCmd) GenKernel(km config.Target, pkg string) {
|
||||
var found bool
|
||||
if kinfo.Distro.ID == distro.Debian { // FIXME
|
||||
found = pkg == kinfo.Package
|
||||
} else if kinfo.Distro.ID == distro.OpenSUSE {
|
||||
found = strings.Contains(pkg, kinfo.KernelRelease)
|
||||
} else {
|
||||
found = strings.Contains(pkg, kinfo.KernelVersion)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user