From 43d7643ba71c79433c6c452413a2078492adfe1a Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Mon, 29 May 2023 12:26:51 +0000 Subject: [PATCH] fix: do not invalidate new kernels while updating kbuild --- distro/debian/kernel.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/distro/debian/kernel.go b/distro/debian/kernel.go index 5d02023..feece8a 100644 --- a/distro/debian/kernel.go +++ b/distro/debian/kernel.go @@ -280,7 +280,6 @@ func findKbuild(versions []string, kpkgver string) ( func updateKbuild(toolsVersions []string, dk *DebianKernel) { if !kver(dk.Version.Package).LessThan(kver("4.5-rc0")) { - dk.Internal.Invalid = true return } @@ -365,7 +364,11 @@ func getKernelsByVersion(slog zerolog.Logger, c *Cache, toolsVersions []string, // version did not have a kbuild built from // the linux source itself, but used the // linux-tools source package. - updateKbuild(toolsVersions, &dk) + if !kver(dk.Version.Package).LessThan(kver("4.5-rc0")) { + dk.Internal.Invalid = true + } else { + updateKbuild(toolsVersions, &dk) + } } dk.Internal.LastFetch = time.Now()