Hi,
Christoph Berg wrote:
> Re: Axel Beckert
> > I wonder if we should generally ignore negative values here (might
> > hide some "wrong time" issues, but then again they should reported by
> > another check) or just accept tiny negative values?
>
> The check was introduced in 2013 by 8fca9ab199:
>
> -} elsif ($last_update >= 1.5) {
> +} elsif ($last_update >= 1.5 or $last_update < 0) {
> $updatecolor = 'yellow';
Ah, I remember. I think there was a false positive (maybe on a SBC
without RTC like a Raspberry Pi) when the time was totally wrong and
hence the last update was in the future, but it hadn't been updated
for quite a while because of that. (HTTPS as well as APT itself is
quite picky about having the proper time these days.)
> The value is coming directly from perl's -M operator, so I don't see
> how the code can/should be fixed
It's definition is:
-M Script start time minus file modification time, in days.
So if apt update started running and then e.g. ntpd or so sets the
time back a bit, this time can get negative.
> and we should probably just ignore the issue by using "or
> $last_update < -0.1".
Ack, let's check against < -0.1 for now.
Regards, Axel
--
,''`. | Axel Beckert <[email protected]>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE