Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use a better heuristic for the apt update last run time
As reported in prometheus-community#182, `pkgcache.bin` gets updated on more than just `apt update`. In particular, it gets modified when a package is installed, upgraded or removed. So let's fallback on a better heuristic, which is the `APT::Periodic` timestamp. This should give us a much more precise and deliberate status. We also fallback to the `lists` directory, which gets updated when new mirror lists gets moved into place. This does run the risk of staying silently unchanged if there's no change on mirrors but (a) that's rather infrequent and (b) we might actually want to warn on that anyway. Signed-off-by: Antoine Beaupré <[email protected]> Closes: prometheus-community#183
- Loading branch information