From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15659 invoked by uid 1002); 2 Jul 2003 09:57:18 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 18215 invoked from network); 2 Jul 2003 09:57:18 -0000 From: Toby Dickenson Reply-To: tdickenson@geminidataloggers.com To: Owen Gunden , gentoo-dev@gentoo.org, Seemant Kulleen Date: Wed, 2 Jul 2003 10:57:16 +0100 User-Agent: KMail/1.5.1 References: <20030701025824.64ecc18a.seemant@gentoo.org> <200307011732.56525.tdickenson@devmail.geminidataloggers.co.uk> <20030701222928.GA23646@force.stwing.upenn.edu> In-Reply-To: <20030701222928.GA23646@force.stwing.upenn.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307021057.16601.tdickenson@devmail.geminidataloggers.co.uk> Subject: Re: [gentoo-dev] Interest Check: Dynamic config files for portage X-Archives-Salt: 50c076d0-e27f-4588-89d4-a1125d8a0be0 X-Archives-Hash: 19111cdbb06fff0fab74f52a3eb3d64c On Tuesday 01 July 2003 23:29, Owen Gunden wrote: > On Tue, Jul 01, 2003 at 05:32:56PM +0100, Toby Dickenson wrote: > > On Tuesday 01 July 2003 16:49, Josep Sanjuas wrote: > > > I think there could be more advantages. > > > > they dont seem very compelling..... > > There is one compelling advantage that I believe was intended by the > original poster. That is this: in the current situation, when I upgrade > baselayout I get a new make.conf which I have to merge by hand. In my > experience this is definitely the hardest file in /etc to merge because of > its size and the amount of customization I've done to it. If it were split > into separate files, it would be easier to see where the new stuff is. > Also, I would be familiar with the particular sections that I'd made > changes to, so I could simply copy the maintainers version of any files > that I know I haven't changed. I am proposing that we can get the same advantages by creating a better merge tool. That is, a merge tool specifically designed for merging configuration files. (but definitely not a ufed-style file-specific tool) I spent some time last night merging make.conf... I think the problem is that sdiff (the tool used by etc-update) is using the standard diff algorithm that minimises diff size. This leads to it selecting chunks of differences that often dont "look right" to the etc-update user. The chunks of differences are very different to what you would get if you asked a human to isolate the differences between the two files. I think the merging task would be much easier with a tool that found more useful chunks of differences. Perhaps something using Python's difflib module? Any feedback gratefully accepted. difflib can be found in cvs here. Check out the comment that starts "SequenceMatcher is a flexible class for comparing...." http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/dist/src/Lib/difflib.py?rev=1 -- gentoo-dev@gentoo.org mailing list