fixed no patch available

This commit is contained in:
2021-11-21 23:49:01 +01:00
parent 2d9e4e166a
commit 8b8c441a8e

View File

@@ -249,7 +249,7 @@ func (p *BuildPackage) prepareKernelPatches() error {
// choose best suited patch based on kernel version
var curVer string
for k, _ := range conf.KernelPatches {
for k := range conf.KernelPatches {
if alpm.VerCmp(p.Srcinfo.Pkgver, k) >= 0 && alpm.VerCmp(k, curVer) >= 0 {
curVer = k
}
@@ -257,7 +257,7 @@ func (p *BuildPackage) prepareKernelPatches() error {
log.Debugf("[KP] choose patch %s for kernel %s", curVer, p.Srcinfo.Pkgver)
if curVer == "none" {
return nil
return fmt.Errorf("no patch available")
}
// add patch to source-array