On Sat, Apr 2, 2022 at 11:23 AM Mark Hindley <lee...@debian.org> wrote: > On Sat, Apr 02, 2022 at 09:44:49AM +0300, Martin-Éric Racine wrote: > > The key problem is APT updating its lists several times in a row > > whenever cron.daily is run i.e. via every package that installs a > > similar snipet either via cron or via apt.conf.d, which quickly > > becomes redundant. > > Didn't the test > > # Don't bother if /sbin/init is systemd. APT ships native timers nowadays. > if [ -d /run/systemd/system ]; then exit 0; fi > > already protect against that?
As I've repeatedly noticed on my Testing host, it doesn't. At some point, I wondered why daily cron jobs took forever and noticed that APT updates its lists several times. One of those was upgrade-system's script. This made it clear to me that there's some pointless redundancy. Looking closer at APT configuration options, it appears that enabling the following does the same as the cron job's update and autoclean: APT { Periodic { Enable "1"; Update-Package-Lists "1"; Download-Upgradeable-Packages "1"; Download-Upgradeable-Packages-Debdelta "1"; AutocleanInterval "1"; CleanInterval "1"; }; }; As it so happens, unattended-upgrades leverages that too. This leaves exactly one feature of the script... > > Which part of the cron snipet specifically do you find essential? > > Well, not essential but after upgrading I noticed I no longer got the daily > email I had come to expect about upgradable packages. ... and apt-show-versions covers that. Would that work for you? Martin-Éric