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.Invalid = true
|
||||||
dk.Internal.LastFetch = time.Now()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if !dk.HasDependency("kbuild") {
|
if !dk.HasDependency("kbuild") {
|
||||||
if !kver(dk.Version.Package).LessThan(kver("4.5-rc0")) {
|
if !kver(dk.Version.Package).LessThan(kver("4.5-rc0")) {
|
||||||
dk.Internal.Invalid = true
|
dk.Internal.Invalid = true
|
||||||
dk.Internal.LastFetch = time.Now()
|
|
||||||
} else {
|
} else {
|
||||||
// Debian kernels prior to the 4.5 package
|
// Debian kernels prior to the 4.5 package
|
||||||
// version did not have a kbuild built from
|
// version did not have a kbuild built from
|
||||||
@ -316,7 +314,6 @@ func GetKernels() (kernels []DebianKernel, err error) {
|
|||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dk.Internal.Invalid = true
|
dk.Internal.Invalid = true
|
||||||
dk.Internal.LastFetch = time.Now()
|
|
||||||
} else {
|
} else {
|
||||||
dk.Dependencies = append(
|
dk.Dependencies = append(
|
||||||
dk.Dependencies,
|
dk.Dependencies,
|
||||||
@ -326,6 +323,8 @@ func GetKernels() (kernels []DebianKernel, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dk.Internal.LastFetch = time.Now()
|
||||||
|
|
||||||
err = c.Put(dk)
|
err = c.Put(dk)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error().Err(err).Msg("put to cache")
|
slog.Error().Err(err).Msg("put to cache")
|
||||||
|
Loading…
Reference in New Issue
Block a user