On Mon, Jun 12, 2006 at 03:06:10PM +0200, Eric Spakman wrote:
> Hello Nataneal,
> 
> >> Cool, but user changes are lost if you choose the option to update the
> >> config file. I was more thinking about something that updates the new
> >> config file with changes from the old one, which is probably almost
> >> impossible ;)
> >
> > Gentoo's etc-update does excatly this. It has a "merge" option in
> > addtion to the above (and "replace all"). If you do merge, etc-update will
> > display evey diff-chunk giving you a possibility to use the chunk from new
> > file or use the current one. mergemaster in freebsd does someting similar.
> >
> Nice! May still be difficult if the config format changes. Currently I use
> the KISS principle, when the config format isn't changed use the user
> changed configfile. When the config format is changed, it may be better to
> start from scratch for that particular config file. But if someone is able
> to create such an implementation in reasonable size and foolproof I will
> happely use it ;)
> 
> > It shouldn't impossible do that in shell with diff/top. But I guess the
> > only sane thing would be to write a C app for that. Maybe later...

In the GNU diffutils there is the (I think fairly unknown) program
sdiff, which allows one to diff to files side by side and merge them.

I have looked into it once, also for some script I wrote for merging
changes while updating to newer versions of Bering uClibc. It's usage
is not very intuitive as far as I recall, but it might be useful...

Regards,
Jaap



_______________________________________________
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to