Re: rpmconf - tool to handle rpmnew and rpmsave files

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

 



Hi,

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.


Regards,
Jan
#! /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
	then
		cmp $base $base.rpmnew
		mv -f $base.rpmnew $base
		continue
	fi

	if diff -u $base-orig $base.rpmnew | patch -f $base
	then
		test ! -f $base.rej
		rm -f $base.orig
		mv -f $base.rpmnew $base-orig
		continue
	fi
	test -f $base.orig
	test -f $base.rej
	mv -f $base.orig $base
	rm -f $base.rej
	exit 1
done
echo OK
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux