On Wednesday 03 January 2007 07:21, Daniel Barkalow wrote:
> On Tue, 2 Jan 2007, Alan McKinnon wrote:
> > On Tuesday 02 January 2007 08:50, Daniel Barkalow wrote:
> > > I also think that emerge should keep track of the config files
> > > installed by packages, so that etc-update knows if you've got
> > > local modifications, and give you a big warning when you might
> > > lose a change you made.
> >
> > Huh? Portage already does this. Standard config dirs are
> > CONFIG_PROTECTed which is where etc-update comes in. It will merge
> > trivial changes (whitespace, etc) and let *you* chose what to do
> > for everything else. You get to keep the original file, use the
> > update, or use a customized merge of the two.
>
> The issue is that etc-update doesn't have the version of the config
> file as installed by the version of the package that's being
> replaced, so it can't tell the difference between non-trivial changes
> to the config file as shipped by gentoo between the old version and
> the new version and non-trivial local modifications that I've made
> myself to a config file which has not been changed between package
> versions. I've definitely had etc-update ask for confirmation on
> files I'm sure I didn't change (including, in some cases, executables
> that get installed in protected directories).

Neither the computer nor etc-update can think. So why are you asking it 
to think? Because that's what you are asking it to do - make an 
intelligent decision about a config file based on it's contents and how 
it differs from a new version.

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? 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.

This will cause b.g.o. to be flooded with bugs about how emerge 
obliterated working config files - are you going to be the one to 
answer all those bug reports? 

> > There is no need to give you a big warning if you might lose a
> > change - the very act of running etc-update at all IS that warning.
> > It's understood that if the new file shows up, then you DO have
> > local modifications
>
> 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.

Again: the computer cannot think. Don't expect it to.

alan
-- 
gentoo-user@gentoo.org mailing list

Reply via email to