svn commit: r195615 - stable/7/usr.sbin/mergemaster

Doug Barton dougb at
Sat Jul 11 08:24:53 UTC 2009

Author: dougb
Date: Sat Jul 11 08:24:51 2009
New Revision: 195615

  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.

  stable/7/usr.sbin/mergemaster/   (props changed)

Modified: stable/7/usr.sbin/mergemaster/
--- stable/7/usr.sbin/mergemaster/	Sat Jul 11 08:10:18 2009	(r195614)
+++ stable/7/usr.sbin/mergemaster/	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 ''
     unset AUTO_UPGRADE
@@ -674,8 +675,11 @@ rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/e
 # We only need to compare things like 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
-# 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.

More information about the svn-src-stable-7 mailing list