Brian J. Murrell wrote:
>>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.
I don't see that as a big problem. Use a script (e.g. the one sent
earlier by Guillaume Rousse) and you can sweep useless rpmnew files very
quickly. You can even add that to your crontabs (btw, nice script
Guillaume).
>>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!
Hmmm, the fact is that RPM is meant to be quick... If you have a dozen
long config files, diffing them one by one will be somewhat slow. But I
agree with you on the theory.
(...)
>>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.
This couldn't work 100%, because if the new config file is totally different
from the previous one, your awaiting patch couldn't be applied. I prefer
solution 1) with rpmnew files. Btw, solution 2) would waste as much
space to store the "unmodifyable copy" as the current "rpmnew" files...
And it cannot be "unmodifyable" neither.
Gr�goire