forked from ALHP/ALHP.GO
fixed no patch available
This commit is contained in:
4
utils.go
4
utils.go
@@ -249,7 +249,7 @@ func (p *BuildPackage) prepareKernelPatches() error {
|
|||||||
|
|
||||||
// choose best suited patch based on kernel version
|
// choose best suited patch based on kernel version
|
||||||
var curVer string
|
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 {
|
if alpm.VerCmp(p.Srcinfo.Pkgver, k) >= 0 && alpm.VerCmp(k, curVer) >= 0 {
|
||||||
curVer = k
|
curVer = k
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,7 @@ func (p *BuildPackage) prepareKernelPatches() error {
|
|||||||
log.Debugf("[KP] choose patch %s for kernel %s", curVer, p.Srcinfo.Pkgver)
|
log.Debugf("[KP] choose patch %s for kernel %s", curVer, p.Srcinfo.Pkgver)
|
||||||
|
|
||||||
if curVer == "none" {
|
if curVer == "none" {
|
||||||
return nil
|
return fmt.Errorf("no patch available")
|
||||||
}
|
}
|
||||||
|
|
||||||
// add patch to source-array
|
// add patch to source-array
|
||||||
|
Reference in New Issue
Block a user