Web lists-archives.com

Re: Clearing the conffile status of a file

* Sven Joachim:

> On 2017-07-12 09:56 +0200, Florian Weimer wrote:
>> I've got a request to remove the conffile status of a file after it is
>> no longer a conffile.  dpkg-maintscript-helper rm_conffile does not
>> seem to do this, based on the documentation and the source code.
>> Is there a clean way to implement this (i.e., by not patching
>> /var/lib/dpkg/status directly)?
> AFAIK the only method, and not a pretty one, that works from package
> maintainer scripts is to rename the file in the preinst and rename it
> back in the postinst.  Plus all the error handling required (e.g. if
> unpacking fails), where dpkg-maintscript-helper would at least take care
> of the gory details[1] for you.

> 1. https://wiki.debian.org/DpkgConffileHandling

Oh, I assumed that this was only about preserving the file, and it
would not affect the state as a conffile as such (except that the file
would be gone).

> My choice would probably be to leave the conffile alone, at least until
> dpkg itself is able to take care of the problem[2].

> 2. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822462

That makes sense, thanks.