feat: always set last fetch date
This commit is contained in:
parent
c13b595ab1
commit
9b33140cc8
@ -298,13 +298,11 @@ func GetKernels() (kernels []DebianKernel, err error) {
|
||||
}
|
||||
|
||||
dk.Internal.Invalid = true
|
||||
dk.Internal.LastFetch = time.Now()
|
||||
}
|
||||
|
||||
if !dk.HasDependency("kbuild") {
|
||||
if !kver(dk.Version.Package).LessThan(kver("4.5-rc0")) {
|
||||
dk.Internal.Invalid = true
|
||||
dk.Internal.LastFetch = time.Now()
|
||||
} else {
|
||||
// Debian kernels prior to the 4.5 package
|
||||
// version did not have a kbuild built from
|
||||
@ -316,7 +314,6 @@ func GetKernels() (kernels []DebianKernel, err error) {
|
||||
)
|
||||
if err != nil {
|
||||
dk.Internal.Invalid = true
|
||||
dk.Internal.LastFetch = time.Now()
|
||||
} else {
|
||||
dk.Dependencies = append(
|
||||
dk.Dependencies,
|
||||
@ -326,6 +323,8 @@ func GetKernels() (kernels []DebianKernel, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
dk.Internal.LastFetch = time.Now()
|
||||
|
||||
err = c.Put(dk)
|
||||
if err != nil {
|
||||
slog.Error().Err(err).Msg("put to cache")
|
||||
|
Loading…
Reference in New Issue
Block a user