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

Re: Removing self-managed conffiles?



On Fri, Jan 19, 2007 at 09:34:28AM +0100, Marc Haber wrote:
> Hi,
> 
> I have a package with a bunch of configuration files that are managed
> by my maintainer scripts and not by dpkg. I now need one of them
> (a.conf) to vanish.
> 
> How do I do this in a clean way? I am thinking about the following:
> 
> (1) Let the new package version know about the md5sum of the last
>     version(s) of a.conf that were in the package.
> (2) If one of the md5sums matches, the file has not been changed,
>     remove it.
> (3) If none of the md5sums matches, the file has locally been changed,
>     rename it to a.conf.package-old
You will have to test with both sarge and etch dpkg (until after etch
releases).  Colin Watson recently wrote [0] about one of the ssh bugs
and how this was complicated for him.

You have to include the logic in the preinst, since the prerm is for the old
package, since the postinst happens after the conffile prompts, and since the
postrm happens post rm...

For sarge dpkg, your logic is correct.  AFAIU in Colin's case (perhaps only
because of the Replaces) the logic causes at least as many problems as it
solves, since etch dpkg specifically and deliberately prompts the user about
conffile's which were deleted (sarge dpkg assumes that such deletion was
intentional).

Justin 

References

[0] http://lists.debian.org/debian-release/2006/12/msg01105.html



Reply to: