On Wed, 3 Jan 2007, Alan McKinnon wrote:

> The only possible thing etc-update could ever do is look for trivial 
> changes and ignore them. How would you detect the difference between 
> non-trivial changes to shipped versions and non-trivial changes made 
> locally?

Keep a copy of the config files for installed packages somewhere in /var, 
and provide etc-update with "this is the version we shipped that's going 
away" on package removal. Currently, it only keeps the hash of the config 
file that goes with a package, so it can only tell whether there was a 
change in the shipped version, not what that change was. Portage actually 
has enough information to detect that the user has modified a 
CONFIG_PROTECTed file (moveme and destmd5 != cfgfiledict.get[myrealdest]), 
but doesn't test this or communicate it to etc-update.

> You can't say that if the config file exists and hasn't 
> changed since installation then overwrite it with the new shipped 
> version - that might change the behaviour of an *existing* system 
> (without notification) if the user likes the old way and does not like 
> the new way.

I didn't say it shouldn't require interaction to get the new shipped 
version; I said it should require extra confirmation to discard changes 
made locally. It should also be able to offer 3-way merge instead of 
2-way, and automatically retain local changes that don't conflict with 
shipped changes.

> > It's understood that there is a difference between what I'm using now
> > and what new package comes with. But there's no information on
> > whether that difference came from local modifications.
> 
> And neither should there be. Etc-update knows the files are *different* 
> and stops right there. Evaluating what that difference means is a 
> human's job because it's not a monkey-see, monkey-do process.

What the difference means is up to the humans, but there's no reason, 
aside from having carelessly lost information previously, that it doesn't 
know where the change came from; that part isn't up to human 
interpretation, and it's valuable information for humans trying to 
evaluate what the difference means.

        -Daniel
*This .sig left intentionally blank*
-- 
gentoo-user@gentoo.org mailing list

Reply via email to