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

Re: conffile purging and maintainer scripts

Roger Leigh wrote:
> Until last month, dpkg "forgot" about conffiles which were removed or
> moved on package upgrade.  As a consequence, maintainers had to
> remember to purge these conffiles "by hand" in the package postrm
> script.

I just want to highlight the word "these" above in order to reduce the
possibility of confusion.

Postrms should not delete files that are currently conffiles of the package.
dpkg takes care of deleting such files at the right time.

If a file /etc/foo was formerly a conffile of the package but no longer is so
then /etc/foo should be dealt with in the preinst or postinst.  ("Dealing with
it" has to take into account both the old and the new behavior of dpkg with
respect to disappearing conffiles.  I speak vaguely here because I haven't
looked into the new behavior.)  If it isn't dealt with there then it might be
appropriate to delete it in the postrm, but not if there is reason to suspect
that some other package is now using /etc/foo.

> 1) sarge -> etch upgrades
> -------------------------
> In order to handle upgrades from sarge correctly, maintainers will
> still have to manually remove conffiles in their maintainer scripts
> until at least etch+1 by my reckoning.  Is this correct?

Again, postrms should not remove files that are currently conffiles.
Thomas Hood

Reply to: