best practice for upgrading config files?
Thomas Wolff
mined@towo.net
Wed May 10 20:31:00 GMT 2006
Igor Peshansky wrote:
> ... If the user has modified the default configuration,
> she most likely knows what she is doing, and probably wouldn't want the
> installation to muck with her changes (not even if we could create diffs
This is certainly true.
(On the other hand, having experienced this nuisance of certain packages
a number of times, it is good advice anyway not to rely on changing
system configurations whenever possible, but rather add overriding local
configurations.)
But - again on the other hand - if a new release brings in additional
parameters, I would of course want them to show up in the configuration
so they become effective (and configurable :).
> with the previous version and cleanly apply the patch). What would be
> nice in this case, though, is some feedback like "Not replacing config
> file /etc/lftp.conf due to user changes" to the postinstall script's
> stdout, which will end up in the setup.log file.
Considering what I said above, I think an automatic merge would be the
best, not changing modified parameters, and adding any new parameters.
Apart from some moderate handling effort, the only remaining problem
would be whether to change default values of previously unchanged
parameters - which might have been deliberately unchanged by the
user!
> > (3) Compute a checksum of the current /etc/lftp.conf, and compare it to
> > the checksum of the old default. If they're the same, then the user
> > hasn't touched the old default so copy the new default in. If they're
> > different, then prompt the user as in (2). So we need to store
> > checksums of default config files somewhere. This is Debian's method.
> > ...
> 2) In the preremove, compare each config file from the manifest with the
> current default version of that file, and remove the config file if
> they are identical (using cmp).
> ...
Approaches which either can only replace or not, depending on
comparison of the complete file, or delegate all merging problems to
the user, are unsuitable for my taste.
Kind regards,
Thomas Wolff
More information about the Cygwin-apps
mailing list