From owner-freebsd-current@FreeBSD.ORG Mon Jan 19 09:38:35 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 34AD816A4CE for ; Mon, 19 Jan 2004 09:38:35 -0800 (PST) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40BA543D46 for ; Mon, 19 Jan 2004 09:38:33 -0800 (PST) (envelope-from rihad@mail.ru) Received: from [212.47.129.6] (port=34018 helo=mail.ru) by mx2.mail.ru with esmtp id 1AidM6-000Pfq-00; Mon, 19 Jan 2004 20:38:31 +0300 Message-ID: <400C16BB.8080908@mail.ru> Date: Mon, 19 Jan 2004 21:41:15 +0400 From: rihad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3 X-Accept-Language: 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 X-Spam: Not detected 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:38:35 -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. [snip] Well, I still think adding the "overwrite" switch would be the Right Thing, since it's so basic and provides the necessary mechanism around which to build policies later. Then there's the sysutils/etcmerge port that claims to be the all-singing-all-dancing solution to the merging problem, I wish it were a bit easier to use. Last time I tried, I eventually fried my /etc, thank God I did a last minute backup ;) Any brave soul out there to take on the task of merging [sic] the good ideas found in etcmerge into the base mergemaster? If the file hasn't been touched by user since previous update, overwrite it. If the file doesn't already exist, create it. If the file exists only in /etc, ask whether to delete it.