From owner-svn-src-stable@FreeBSD.ORG Sat Jul 11 08:24:52 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 729781065672; Sat, 11 Jul 2009 08:24:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 455508FC0A; Sat, 11 Jul 2009 08:24:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6B8OqU7046804; Sat, 11 Jul 2009 08:24:52 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6B8Oq24046802; Sat, 11 Jul 2009 08:24:52 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200907110824.n6B8Oq24046802@svn.freebsd.org> From: Doug Barton Date: Sat, 11 Jul 2009 08:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195615 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2009 08:24:53 -0000 Author: dougb Date: Sat Jul 11 08:24:51 2009 New Revision: 195615 URL: http://svn.freebsd.org/changeset/base/195615 Log: MFC r193853, update -U message when there is no mtree db, dramatically reduce the size of the saved mtree db, streamline find command for the main loop, and remove a spurious comment. Modified: stable/7/usr.sbin/mergemaster/ (props changed) stable/7/usr.sbin/mergemaster/mergemaster.sh Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Sat Jul 11 08:10:18 2009 (r195614) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Sat Jul 11 08:24:51 2009 (r195615) @@ -353,7 +353,8 @@ case "${AUTO_UPGRADE}" in *) if [ ! -s "${DESTDIR}${MTREEFILE}" ]; then echo '' - echo "*** Unable to find mtree database. Skipping auto-upgrade." + echo "*** Unable to find mtree database. Skipping auto-upgrade on this run." + echo " It will be created for the next run when this one is complete." echo '' press_to_continue unset AUTO_UPGRADE @@ -674,8 +675,11 @@ rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/e # We only need to compare things like freebsd.cf once find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null -# Delete 0 length files to make the mtree database as small as possible. +# Delete stuff we do not need to keep the mtree database small, +# and to make the actual comparison faster. +find ${TEMPROOT}/usr -type l -delete 2>/dev/null find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null +find -d ${TEMPROOT} -type d -empty -delete 2>/dev/null # Build the mtree database in a temporary location. MTREENEW=`mktemp -t mergemaster.mtree` @@ -963,11 +967,7 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th . "${MM_PRE_COMPARE_SCRIPT}" fi -# Using -size +0 avoids uselessly checking the empty log files created -# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does -# check the scripts in ./dev, as we'd like (assuming no devfs of course). -# -for COMPFILE in `find . -type f -size +0`; do +for COMPFILE in `find . -type f`; do # First, check to see if the file exists in DESTDIR. If not, the # diff_loop function knows how to handle it.