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

Re: Configuration file handling (was: RFC: OpenRC as Init System for Debian)

On Fri, May 11, 2012 at 01:41:32PM +0100, Roger Leigh wrote:
> On a related note...
> While we might criticise rpm for its bad conffile handling, dpkg is
> itself fairly woeful, and if we change one thing for wheezy+1, it
> should be sane conffile handling.  dpkg should never "forget" about
> conffiles; the fact that maintainer scripts have to take care of
> purging such files is a glaring defect, and possibly the source of
> the greatest fragility in our maintainer scripts--it's impossible for
> maintainer scripts to get this right all the time given all the
> corner cases like downgrades and being taken over by other packages.
> If this was implemented robustly, the maintainer script should never
> need to concern itself with such cleanup, or indeed any manual work
> with conffiles at all, except maybe for deletion ahead of purge
> where this is needed.  And given the frequency this is needed, a
> defined mechanism to do this would be useful.

Since maintainer scripts have nothing to do with purging conffiles on
package purge, I guess you're talking here about packages failing to clean
up on upgrade when a new version of the package no longer ships a conffile
that was present in the old version.

The flaw in your argument is that whereas it's difficult for maintainer
scripts to always do the right thing, it's *impossible* for dpkg to always
do the right thing without more information from the package itself.  You
cannot assume that removing the conffile from the filesystem is the right
thing to do on package upgrade; for instance, it may have been changed from
conffile to non-conffile config file, in which case removing the conffile
will obliterate the user's settings that the package maintainer expected
would be retained.

dpkg's conffile handling continues to become /increasingly/ robust and
provide improved interfaces for package maintainers -
dpkg-maintscript-helper being the latest long-sought addition.  At this
point the primary causes of mis-handling of configuration files is
maintainers that have failed to read or understand policy.  I don't think
there's much more automation to be squeezed out of dpkg to cover for such
lackluster maintainer education.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature

Reply to: