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

Bug#470633: Explicitly say obsolete configuration files may be removed



Hi!

On Mon, 2009-09-07 at 14:42:46 -0700, Russ Allbery wrote:
> Manoj Srivastava <srivasta@debian.org> writes:
> 
> >         This bug has not been looked at for a while. The wiki article:
> >  states:
> > ,----[  http://wiki.debian.org/DpkgConffileHandling ]
> > |   If you completely remove a configuration file, you should make sure
> > |   it's also removed from the disk. However if the user has modified it,
> > |   then you have to preserve the user's modifications somehow in case
> > |   they wish to refer to them (see also Policy 10.7.3). 
> > |
> > |   This can be done your preinst script when given the install or upgrade
> > |   argument with a package version known to have the conffile that has
> > |   been removed. 
> > `----
> 
> >         I do think this makes  sense, and is definitely a good practice
> >  (and thus belongs in the developers reference, at least, if not in
> >  policy proper.
> 
> >         The argument I see for having it in policy proper is that a
> >  conffile left behind which is no longer used has potential for
> >  confusion, not only for humans, but other packages that may parse the
> >  configuration.
> 
> Also, if I remember this discussion correctly, Policy currently could be
> read as saying that a package isn't permitted to remove its obsolete
> configuration files, so we should at least fix the wording to make it
> clear it's permitted for packages to do that.

Right, I think policy should allow it, as currently the maintainer is
the one knowing if the conffile is being switched to a configuration file
or is just obsolete, and in that later case if it might create problems
to keep it around.

But I think this is something that should be handled by dpkg itself in
the future when we have the dpkg-conffile program. What to do then is
something to be discussed when we create such interface, but there's
already some proposal on #108587.

There are also few relevant bug reports about conffile handlind in
dpkg:

 #108587 handle disappearing conffiles
 #330256 remove obsolete non-modified conffile on pkg upgrade/downgrade
 #351900 remove obsolete non-modified conffile on pkg remove

> >         I also think we should consider what happens if the package is
> >  subsequently purged; in that case, all the conffiles it uses are
> >  purged -- but the conffile it no longer uses is left behind as cruft in
> >  the system, which seems like a flaw.
> 
> It can be hard to track all of the historical checksums of configuration
> files (consider logcheck-database, for instance), but I think it's
> reasonable for Policy to say that packages should make a best effort to
> remove obsolete configuration files on purge.  I believe puiparts is
> already complaining about packages that don't do this.  We could start
> with something lighter than should, or start with putting it in the
> devref, I suppose.

That one has been a bug in dpkg, which I've already fixed in git,
should be in dpkg 1.15.5:

 <http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=368b3934>

regards,
guillem



Reply to: