From owner-freebsd-current@FreeBSD.ORG Mon Jan 19 09:13:15 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0D9716A4CE for ; Mon, 19 Jan 2004 09:13:15 -0800 (PST) Received: from otter3.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D99F43D39 for ; Mon, 19 Jan 2004 09:13:13 -0800 (PST) (envelope-from anderson@centtech.com) Received: from centtech.com (neutrino.centtech.com [10.177.171.220]) by otter3.centtech.com (8.12.3/8.12.3) with ESMTP id i0JHDC6T026479; Mon, 19 Jan 2004 11:13:12 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <400C100F.1090101@centtech.com> Date: Mon, 19 Jan 2004 11:12:47 -0600 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bill Moran References: <400C012E.4040002@mail.ru> <400C0E5F.5010606@potentialtech.com> In-Reply-To: <400C0E5F.5010606@potentialtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: question on mergemaster X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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, 19 Jan 2004 17:13:15 -0000 Bill Moran wrote: > rihad wrote: > >> Hi. I was wondering if there are any improvements planned to be made to >> mergemaster? After today's cvsup I had to sit and keep pressing either >> "q" (to break out of the pager) or "i" to accept the new file. This *is* >> boring, considering there seemed to be no end to them and I eventually >> killed mergemaster, because I had started to get nervous and make silly >> typos :). It's just my toy home machine and there's only few files under >> /etc that I care about, and these mergemaster doesn't touch anyway (like >> fstab, rc.conf etc). Wouldn't it be great if one could add the "assume >> yes" flag so that it overwrites without prompting (like gentoo's >> etc-update does when you ask it). Currently I came up with this dirty >> hack to save myself from hundreds of confirmations, it kind of worked: >> >> # ( echo d; while :; do echo -e "q\ni"; done ) | mergemaster -i >> >> Is such an "no-prompt" option considered important enough to be >> integrated RSN or am I missing some obvious and convenient usage pattern >> everyone know about? >> >> Thanks in advance and sorry if this is a bit offtopic. > > > I'm going to chime in because this has hung over my head for a while. > > I've considered writing and submitting a patch to mergemaster to do this > since the first time I used it. The biggest problem with lookin at > _every_ file is that it makes the user more prone to error as the tedium > bores him. Obviously, a switch the simply updates everything is > pretty much guaranteed to screw somebody! so that's not a good idea > either. > > But I just thought of a potential improvement, and I thought I'd suggest > this to everyone and see what they think: > > If mergemaster checked each file for a magic value, such as: > # mergemaster autoreplace > and automatically updated those files without prompting the user, then > users could add such a line to the beginning of each file in /etc that > they are comfortable updating without feedback. It may seem like a lot > of work, but it's only done _once_ (although mergemaster would need to > be taught to preserve this magic when it updates the file) > > The optimistic way to do this would be to have some sort of switch to > mergemaster to tell it to go into autoupdate mode, and it will only ask > for files that contain a "negative magic" like: > # mergemaster noautoreplace > In which case the administrator should put this string at the beginning > of every file that he tweaks in /etc I like the optimistic approach.. Should some files have this in by default? Like rc.conf? How about a few other options, like: # mergemaster neverreplace For files that should never be touched (in my case, printcap) Eric -- ------------------------------------------------------------------ Eric Anderson Systems Administrator Centaur Technology All generalizations are false, including this one. ------------------------------------------------------------------