这是indexloc提供的服务,不要输入任何密码

Debian Bug report logs - #994903
remove-on-upgrade breaks packages replacing conffiles by non-conffile

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: Christoph Berg <myon@debian.org>

Date: Wed, 22 Sep 2021 22:24:01 UTC

Severity: normal

Found in version dpkg/1.20.9

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, niels@thykier.net, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#994903; Package dpkg. (Wed, 22 Sep 2021 22:24:03 GMT) (full text, mbox, link).


Message #3 received at submit@bugs.debian.org (full text, mbox, reply):

From: Christoph Berg <myon@debian.org>
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).


Message #8 received at 994903@bugs.debian.org (full text, mbox, reply):

From: Sven Joachim <svenjoac@gmx.de>
To: Christoph Berg <myon@debian.org>
Cc: 994903@bugs.debian.org, Niels Thykier <niels@thykier.net>, systemd@packages.debian.org
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



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 27 18:45:50 2025; Machine Name: buxtehude

Debian Bug tracking system

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/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.