[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rpmconf - tool to handle rpmnew and rpmsave files


from these tools only Gentoo looks to me to do the right thing - one has to do
a 3-files merge.  Just having the old modified file and the new unmodified
files has no solution how to do the automatic merge = how to get the new
configuration file with all the local changes of the old file brought in.

rpm should save originals of all the configuration files it installs.
On Fedora I have to save them by hand before modifying any config file (I save
them to <name>-orig files).  Then by hand (or by the automated attached
script) do the diff/patch merge.

> http://miroslav.suchy.cz/fedora/rpmconf/rpmconf
> http://svn.mandriva.com/cgi-bin/viewvc.cgi/soft/rpmdrake/trunk/Rpmdrake/rpmnew.pm?view=markup
> yum-plugin-merge-conf (not installed by default)

All these tools require human interaction even in the case a fully automated
("95% safe") merge is possible.  Moreover the human can never be sure if (s)he
did not forget to merge in some of the changes from the old version of the file.

> http://learn.clemsonlinux.org/wiki/Gentoo:etc-update

Not sure if this one but maybe Gentoo dispatch-conf does the right thing.

#! /bin/sh
set -ex
for base in "$@";do
	base=`echo $base|sed 's/[.]rpmnew$//'`
	test -f $base
	test -f $base.rpmnew
	test ! -f $base.orig
	test ! -f $base.rej

	if test ! -f $base-orig
		cmp $base $base.rpmnew
		mv -f $base.rpmnew $base

	if diff -u $base-orig $base.rpmnew | patch -f $base
		test ! -f $base.rej
		rm -f $base.orig
		mv -f $base.rpmnew $base-orig
	test -f $base.orig
	test -f $base.rej
	mv -f $base.orig $base
	rm -f $base.rej
	exit 1
echo OK

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]