summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mergemaster
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2009-06-09 20:20:08 +0000
committerdougb <dougb@FreeBSD.org>2009-06-09 20:20:08 +0000
commit92a39a1942a3a8225daf421f061fcbec4de4199d (patch)
treebcd6096b8b491138059598c8782e7d8e76eb18fb /usr.sbin/mergemaster
parent583b806b87b95920a738437b051af7e60bfa9797 (diff)
downloadFreeBSD-src-92a39a1942a3a8225daf421f061fcbec4de4199d.zip
FreeBSD-src-92a39a1942a3a8225daf421f061fcbec4de4199d.tar.gz
1. Update the message that prints out for -U when the mtree database does
not exist to let the user know that it will be created for the next run. 2. Delete more stuff we're not going to use from the temproot prior to creating the mtree database to dramatically reduce its size (162K -> 37K). 3. We've been deleting the zero-size files from temproot for a long time now, so remove the spurious "-size +0" from the find command in the comparison loop, and remove what is now a really stale comment.
Diffstat (limited to 'usr.sbin/mergemaster')
-rwxr-xr-xusr.sbin/mergemaster/mergemaster.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh
index f8b92c0..4d2ffc0 100755
--- a/usr.sbin/mergemaster/mergemaster.sh
+++ b/usr.sbin/mergemaster/mergemaster.sh
@@ -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}/etc/passwd
# 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}" ]; then
. "${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.
OpenPOWER on IntegriCloud