feat!: new kernel config structure
BREAKING CHANGE: kernel definition in the configuration files has switched from [[targets]] distro = { id = "Ubuntu", release = "18.04" } release_mask = ".*" to [[targets]] distro = { id = "Ubuntu", release = "18.04" } kernel = { regex = ".*" }
This commit is contained in:
@ -57,13 +57,13 @@ func Match(km config.Target) (pkgs []string, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
r, err := regexp.Compile("kernel-" + km.ReleaseMask)
|
||||
r, err := regexp.Compile("kernel-" + km.Kernel.Regex)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, pkg := range strings.Fields(output) {
|
||||
if r.MatchString(pkg) || strings.Contains(pkg, km.ReleaseMask) {
|
||||
if r.MatchString(pkg) || strings.Contains(pkg, km.Kernel.Regex) {
|
||||
log.Trace().Msg(pkg)
|
||||
pkgs = append(pkgs, pkg)
|
||||
}
|
||||
|
Reference in New Issue
Block a user