Re: Removing former conffiles
On Mon, Feb 06, 2006 at 03:41:13PM -0500, pryzbyj wrote:
> On Mon, Feb 06, 2006 at 09:21:28PM +0100, Bas Wijnen wrote:
> > Hello,
> >
> > After bug report #339387, I added a postinst file to the dummy package
> > gnocatan-meta-server, which does
> > update-rc.d gnocatan-meta-server remove &>/dev/null || true
> > in order to get rid of the links which were created by the previous
> > (non-dummy) version of the package.
> >
> > However, this didn't seem to work. Appearantly this is what happened:
> > - The non-dummy package created the conffile
> > - The package was upgraded to the dummy version, which no longer held the
> > conffile. However, it being a conffile, it was not removed (perhaps this is
> > only true if it was actually changed?)
> > - On purging the dummy package, the conffile is not removed because it isn't
> > listed as part of the package.
> > - update-rc.d then refuses to remove the links, because the file is still
> > there.
> > - Both the conffile and the links remain on the system.
> >
> > The question is, how do I solve this? Should I forcefully remove the conffile
> > before calling update-rc.d? It feels really bad to remove files from /etc in
> > maintainer scripts, but perhaps it's the right thing to do...
> It is fine to remove the conffile in purge. If you're handling a
> nonconffile config file, this is precisely what you [have to] do.
>
> You might also be interested in
>
> http://www.dpkg.org/ConffileHandling
>
> Also in some existing "conffile prompts" bugs:
>
> 335276 345112 304066 345113 346282 337992
>
> and the message I sent to them about "transferring conffile ownership".
I just read the bug log, and I like Steve's suggestion better. Check
the upgrading-from version in postinst, and remove the files there.
That way there aren't useless files before its purged, either.
Justin
Reply to: