[WIP]fix(scan): collect a running version of kernel-devel (#1044)

* fix(scan): collect a running kernel-devel version

* refactor
This commit is contained in:
Kota Kanbe
2020-09-01 14:37:40 +09:00
committed by GitHub
parent 7969b343b0
commit 4f1578b2d6
4 changed files with 54 additions and 12 deletions

View File

@@ -22,7 +22,8 @@ func isRunningKernel(pack models.Package, family string, kernel models.Kernel) (
return false, false
case config.RedHat, config.Oracle, config.CentOS, config.Amazon:
if pack.Name == "kernel" {
switch pack.Name {
case "kernel", "kernel-devel":
ver := fmt.Sprintf("%s-%s.%s", pack.Version, pack.Release, pack.Arch)
return true, kernel.Release == ver
}