Hi,this is still present in unattended-upgrades 2.14 (sid) and 2.12 (trixie), and I have proposed a possible fix upstream [1]. I opened it as a draft because it changes which packages unattended-upgrades installs, so I would like some opinions before it is considered for merging.
When a conffile is diverted, dpkg compares the file the diversion points to, not the one in the original place, unless the diversion belongs to the package itself (namenodetouse() in dpkg). unattended-upgrades always reads the original place, so its answer can be wrong in both directions. I reproduced both in sid, trixie, bookworm and Ubuntu 24.04 chroots, with a test package and the real dpkg:
- with a local diversion made with --rename and the admin's own file in the original place (the case in this report), or with a conffile diverted by another package (as config-package-dev does), unattended-upgrades reports a conffile prompt that dpkg does not show, so the package is kept back on every run, security updates included; - with a local diversion made with --no-rename (still the default of dpkg-divert), the unmodified file stays in the original place and dpkg finds the diverted one missing: unattended-upgrades reports no prompt, then dpkg stops at the prompt and the package is left unpacked but not configured.
The fix asks dpkg-divert (--list once per run, then --listpackage and --truename for the conffiles that may be diverted) and checks the same file dpkg checks. With it, the answer of unattended-upgrades matched dpkg in all the cases I tried, and a complete run upgraded the packages that were kept back and kept back the one it used to leave unconfigured. The details and the open questions are in the pull request.
Moritz, if you still use local diversions of conffiles on systems with unattended-upgrades, a test of the patch on one of them would be very welcome.
Thanks, Fabio [1] https://github.com/mvo5/unattended-upgrades/pull/482
OpenPGP_signature.asc
Description: OpenPGP digital signature

