From owner-freebsd-questions Tue Dec 12 6: 9:44 2000 From owner-freebsd-questions@FreeBSD.ORG Tue Dec 12 06:09:41 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 0763737B400 for ; Tue, 12 Dec 2000 06:09:41 -0800 (PST) Received: (qmail 59106 invoked by uid 100); 12 Dec 2000 14:09:40 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14902.12708.622031.399130@guru.mired.org> Date: Tue, 12 Dec 2000 08:09:40 -0600 (CST) To: cam (Camille HUOT) Cc: questions@freebsd.org Subject: Re: mergemaster In-Reply-To: <34037397@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG cam (Camille HUOT) types: > On Mon, 11 Dec 2000 22:07:32 +0300 > "Artem Koutchine" wrote: > > I wonder if this procedure can be a little bit more automatic. For example, > > the mergmaster checks if the file have been actually changed, and it was not > > (from the original file of the prev mergmaster) than it can pretty much > > install a new > > version of it, otherwiese - ask the user. The problem is to determine > > whether it was > > changed :) > > > We could modify the CVS tag for example, or add a string > ### MODIFIED ### > at the script's beginning Yes - but if you don't document that, people will be *very* upset when it blows away their modified files without telling them (whether or not it's an option). Using the r/o vs. r/w, at least they had to go a little out of their way to do it. If you're really serious about this, create a directory /var/mergemaster. Then, when mergemaster installs /$CONFIG_FILE, have it check for /var/mergemaster/$CONFIG_FILE. If that exists, compare it to the md5 sum of /$CONFIG_FILE. If the two match, the file hasn't changed, and you can install the new one - and update the md5 sum in /var/mergemaster/$CONFIG_FILE. If /var/mergemaster/$CONFIG_FILE doesn't exist or doesn't match the md5 sum of the file being installed, ask the user about it as per normal. If you install the new one, update /var/mergemaster/$CONFIG_FILE, otherwise delete it. You might want to add an option to let people install the file without installing /var/mergemaster/$CONFIG_FILE as well. This behavior should be *optional*. Some people want to see the differences between files they don't change, and so don't want any of this. Others want to see some of them, but not all - which is what the new "install without md5" option is for.