From owner-freebsd-current@FreeBSD.ORG Mon Jul 6 19:05:39 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D2A01065670 for ; Mon, 6 Jul 2009 19:05:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 374B98FC13 for ; Mon, 6 Jul 2009 19:05:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 8063 invoked by uid 399); 6 Jul 2009 19:05:30 -0000 Received: from localhost (HELO ?10.9.1.188?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 6 Jul 2009 19:05:30 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A524AE2.2020902@FreeBSD.org> Date: Mon, 06 Jul 2009 12:05:06 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: rea-fbsd@codelabs.ru References: In-Reply-To: X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Ian Freislich , current@freebsd.org Subject: Re: pebkac, but is it a mergemaster bug? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2009 19:05:39 -0000 Eygene Ryabinkin wrote: >> Was mergemaster correct in its assesment that this file was a >> candidate for automatic installation? > > I'd say, "No it was mistaken". Overall I tend to agree with you, however I'll use this as yet another reminder that my resistance to making mergemaster more "automatic" by default has a solid basis. > Basically, there should be a way to > determine new files that were added to the tree since the last > mergemaster run. And there is a way: > ----- > mtree -f ${MTREENEW} -f ${MTREEFILE} | \ > awk '/^[^[:space:]]/ && $2 == "file" { print $1; }' > ----- > So, we should additionally check if auto-installed files are present > in the list produced by the latter command and refuse to copy them > over. This situation with ntp.conf is the first time I remember that we've ever added an example config file to the base that the user is likely to have already in /etc (as opposed to /usr/local/etc which is where user-originated stuff usually goes). So I'm not sure that this feature as described is the most efficient way to solve the problem. We just had a thread on this topic recently where I suggested that the proper solution is to teach mtree to issue a list of files that have _not_ changed and have mergemaster depend on that list instead of getting the list of things that have changed and assuming that anything not on that list is safe to replace. Alternatively, if you really want to work on a patch that is for mergemaster only you could get the list of files that have changed, and parse the existing mtree db file against that list to generate a list of files that have not changed. > Doug, I am going to implement this stuff. Maybe I am overseeing > something and there are another ways to overcome this problem? Will > you commit such an extension to the mergemaster? I currently lack the time to do the mtree stuff, but I will gladly make the change to mergemaster if someone else can implement it. hth, Doug