To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: remove-on-upgrade breaks packages replacing conffiles by non-conffile
Date: Thu, 23 Sep 2021 00:20:05 +0200
Package: dpkg
Version: 1.20.9
Severity: normal
X-Debbugs-Cc: Niels Thykier <niels@thykier.net>
Hi,
the new remove-on-upgrade logic from #822462 breaks the use-case of
replacing a conffile by a non-conffile version.
In postgresql-common, I'm trying to remove
/etc/apt/apt.conf.d/01autoremove-postgresql as a conffile, while still
generating that file from the package postinst. That worked[*] since
debian/postgresql-common.maintscript knows in which previous package
versions to trigger the logic, and the logic fires only once.
The same workflow happens for everyone moving from conffile to ucf.
The new logic does not know on which previous package versions to
trigger, and triggers always instead, and worse, it even triggers if
the file is no longer a conffile, but has been properly regenerated.
That means, on each package installation, I'm seeing this:
Setting up postgresql-common (229) ...
Obsolete conffile '/etc/apt/apt.conf.d/01autoremove-postgresql' has been modified by you.
Saving as /etc/apt/apt.conf.d/01autoremove-postgresql.dpkg-old ...
Is the answer here that I should keep the conffile flag around even if
the package isn't shipping the file anymore? Users tend to complain if
a file is in that state.
Christoph
[*] The full truth is there was a typo in
debian/postgresql-common.maintscript which made it remove apt's
/etc/apt/apt.conf.d/01autoremove instead. Oops.
Information forwarded
to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>: Bug#994903; Package dpkg.
(Thu, 23 Sep 2021 05:27:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Sven Joachim <svenjoac@gmx.de>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>.
(Thu, 23 Sep 2021 05:27:02 GMT) (full text, mbox, link).
Subject: Re: Bug#994903: remove-on-upgrade breaks packages replacing
conffiles by non-conffile
Date: Thu, 23 Sep 2021 07:23:45 +0200
On 2021-09-23 00:20 +0200, Christoph Berg wrote:
> Package: dpkg
> Version: 1.20.9
> Severity: normal
> X-Debbugs-Cc: Niels Thykier <niels@thykier.net>
>
> Hi,
>
> the new remove-on-upgrade logic from #822462 breaks the use-case of
> replacing a conffile by a non-conffile version.
Not only that, it also breaks if the conffile has been moved to another
package. Today's systemd upgrade surprised me by deleting two conffiles
of systemd-timesyncd:
,----
| systemd (247.9-2) wird eingerichtet ...
| Entfernen des veralteten Conffiles /etc/dhcp/dhclient-exit-hooks.d/timesyncd ...
| Entfernen des veralteten Conffiles /etc/systemd/timesyncd.conf ...
`----
,----
| $ dpkg --verify systemd-timesyncd
| ??5?????? c /etc/dhcp/dhclient-exit-hooks.d/timesyncd
| ??5?????? c /etc/systemd/timesyncd.conf
`----
Cheers,
Sven
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.