manjaro / mdd

Manjaro Data Donor - WIP
MIT License
12 stars 3 forks source link

last_update is wrong #13

Closed MR-Diamond closed 2 weeks ago

MR-Diamond commented 2 weeks ago

mdd, on my system, reports last_update as 2022-04-15, but is not true: currently, the last update of my system, was on 2024-10-10.

romangg commented 2 weeks ago

What does grep "\\[ALPM\\] upgraded" /var/log/pacman.log | tail -3 give you?

MR-Diamond commented 2 weeks ago
[2022-04-15T22:09:15+0200] [ALPM] upgraded libsoup3 (3.0.4-2 -> 3.0.6-1)
[2022-04-15T22:09:15+0200] [ALPM] upgraded tracker3 (3.2.1-2 -> 3.3.0-1)
[2022-04-15T22:09:15+0200] [ALPM] upgraded gtk-update-icon-cache (1:4.6.1-3 -> 1:4.6.2-1)
MR-Diamond commented 2 weeks ago

If I run grep -a "\\[ALPM\\] upgraded" /var/log/pacman.log | tail -3 it gives me the today's updates:

[2024-11-07T13:43:02+0100] [ALPM] upgraded faudio (24.10-1 -> 24.11-1)
[2024-11-07T13:43:03+0100] [ALPM] upgraded ocenaudio-bin (3.14.6-1 -> 3.14.7-1)
[2024-11-07T13:43:04+0100] [ALPM] upgraded google-chrome (130.0.6723.91-1 -> 130.0.6723.116-1)
MR-Diamond commented 2 weeks ago

If I run grep -a

I used grep with the -a flag because the first command alerts me about

grep: /var/log/pacman.log: binary file matches

romangg commented 2 weeks ago

Interesting. I don't know what that means here regarding the file. Has the log been changed to use a binary format? In any case maybe it's then enough to add the -a flag to the call in MDD.

MR-Diamond commented 2 weeks ago

Has the log been changed to use a binary format?

I never touched /var/log/pacman.log

romangg commented 2 weeks ago

The file might have been damaged at some point in the past, like this StackOverflow comment implies. For example by an incomplete file write or so.