1
0

feat: less smart kbuild version guess

This commit is contained in:
2023-05-29 11:21:20 +00:00
parent 7942bd22fa
commit 9271d69bc6
2 changed files with 28 additions and 11 deletions

View File

@@ -3,7 +3,6 @@ package debian
import (
"errors"
"math"
"sort"
"strings"
"time"
@@ -227,10 +226,6 @@ func getCachedKernel(deb string) (dk DebianKernel, err error) {
}
func kbuildVersion(versions []string, kpkgver string) string {
sort.Slice(versions, func(i, j int) bool {
return kver(versions[i]).GreaterThan(kver(versions[j]))
})
for _, v := range versions {
if v == kpkgver {
return v
@@ -254,12 +249,6 @@ func kbuildVersion(versions []string, kpkgver string) string {
continue
}
// Use the first version that is newer than the kernel
if ver.LessThan(cver) {
continue
}
return v
}