[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Removing former conffiles

This one time, at band camp, Bas Wijnen said:
> 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.

Investigate the -f option of update-rc.d.  There are various tricks
around for getting rid of unwanted old conf files (check that the md5sum
is unchanged and rm it if so, etc), but if you can safely just remove
the links and be done with it, that's probably the simplest.

> 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...
> As an aside, I suppose that such "manual" removal would work both for file-rc
> and sysv-rc, right?

I have no idea how they work, sorry.
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran@debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |

Attachment: signature.asc
Description: Digital signature

Reply to: