On Tue, May 31, 2011 at 12:08 AM, David W Noon <dwn...@ntlworld.com> wrote:
> On Mon, 30 May 2011 21:20:01 +0200, Neil Bothwick wrote about Re:
> [gentoo-user] Cleaning redundant configuration files:
>
>>On Mon, 30 May 2011 19:05:10 +0100, David W Noon wrote:
> [snip]
>>> The only algorithmic approach with which I would feel comfortable
>>> would be if the file were checked against the previous contents of a
>>> package and found present, but has disappeared from the new contents
>>> of that same package.  Even then, I would want manual confirmation.
>>
>>That omits the most common cause of orphaned files, that the package
>>owning it has been unmerged.
>
> You have just touched on an annoyance of unmerge, in that it does not
> clean up configuration files that have been modified.  It removes files
> that are still in the same state as when the package was emerged, but
> not those modified by the user.  I don't see how user changes make the
> file more important than would be in its vanilla state.
>
> Perhaps an option to remove (by an unmerge, not etc-update or the
> like) these genuinely orphaned files could be set in /etc/make.conf.

The logic appears to be that an unmodified file will be re-instated
as-is should the package be re-merged, so nothing changes. A modified
config file is more problematic - if the package is re-merged, which
version should be used? The old one or the new vanilla one? Presumably
the user modified the file last time round for a reason and that
reason might still be valid.

Only one sensible choice remains - present both files to the human
user and ask them to decide.

If memory serves, this is in some doc somewhere, I know I read it long
ago but don't remember where.


-- 
Alan McKinnon
alan dot mckinnon at gmail dot com

Reply via email to