On Mon, Sep 10, 2001 at 03:31:21AM -0500, Lonnie Borntreger wrote:
> 
> RedHat ALWAYS replaces the files, sometimes without warning.  Then you
> have to check every config file to make sure you didn't lose something. 

That is bad (not that I know they actually do that, but if they do...)

> With Mandrake, I just watch for messages about a .rpmnew being created. 
> If so, I go diff it with what I have to see what, if anything, needs to
> be pulled in.  It's called administering your system.

~ding ding ding~  We have a winner.  You have discovered the biggest
problem with creating .rpmnew files even when the config file has not
changed.  I went through about 2 dozen .rpmnew files and discovered
that over 90% of them were the same file as the previous version.
It's more than just annoying to wade through 2 dozen .rpmnew files to
find only one or two that actually need replacing.

> The only ways to solve this is (both probably require mods to rpm
> itself):
> 1) (as suggested by the person who started this thread) if the file is
> unchanged from its original default contents (using cmp or sums or
> whatever way to verify), then overwrite it,

Uhm, that is not an idea that needs mods to work.  That is how it is
SUPPOSED to work!

> else install the new one as
> rpmnew and warn (like now).

No.  If the config file is not different than what is in the package
being upgraded, replace the config file.  That is the only right way
to do it.

> 2) Create some logic that can find mods, if any, and merge them into the
> new configuration file.  (this would be REALLY hard, since there are SO
> MANY ways a configuration file could be modified -- lines deleted,
> commented out, etc. etc.)

Actually that is not very difficult.  You keep an unmodifyable copy of
all config files installed and when the package is upgraded, you diff
between the unmodified copy of the config file and the config file.
If that diff patches into the new config file, patch the config file
after the upgrade and warn.

b.


-- 
Brian J. Murrell

Reply via email to