From owner-cvs-src-old@FreeBSD.ORG Sat Dec 19 05:20:48 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D646710657C0 for ; Sat, 19 Dec 2009 05:20:48 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9D9A88FC0C for ; Sat, 19 Dec 2009 05:20:48 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nBJ5Kmhc027083 for ; Sat, 19 Dec 2009 05:20:48 GMT (envelope-from dougb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nBJ5Kmxr027082 for cvs-src-old@freebsd.org; Sat, 19 Dec 2009 05:20:48 GMT (envelope-from dougb@repoman.freebsd.org) Message-Id: <200912190520.nBJ5Kmxr027082@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to dougb@repoman.freebsd.org using -f From: Doug Barton Date: Sat, 19 Dec 2009 05:20:26 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/mergemaster mergemaster.sh X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2009 05:20:48 -0000 dougb 2009-12-19 05:20:26 UTC FreeBSD src repository Modified files: usr.sbin/mergemaster mergemaster.sh Log: SVN rev 200708 on 2009-12-19 05:20:26Z by dougb Fix a problem with how mergemaster handles the hard links for /.cshrc and /.profile. The problem is that install(1) will unlink the old file before it installs the new one, which means that in the best case we have to compare the changes for the old file twice. So, change the logic to first test to see if the link exists, then install the file. Then if the link was there and we're using -i, just create the link in /root and be done with it. Otherwise display the message to the user and give them the option. Because we are now sorting things before doing the comparison we can know conclusively that the files in / should be the sources, and the files in /root will be the targets, so adjust the paths accordingly. While I'm here, split a too-long error message into two lines and just return at the end of handling these files instead of setting the variable that says "do nothing" and then returning at the end of the function anyway. Revision Changes Path 1.77 +20 -13 src/usr.sbin/mergemaster/mergemaster.sh