Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Mar 2009 07:34:05 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189761 - head/usr.sbin/mergemaster
Message-ID:  <200903130734.n2D7Y5Xc055843@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Fri Mar 13 07:34:05 2009
New Revision: 189761
URL: http://svn.freebsd.org/changeset/base/189761

Log:
  When using the -D option:
  1. The new mtree file should be created in the "host" system /tmp
  2. The existing mtree file in the "host" system should not be deleted
  
  Submitted by:	scf

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==============================================================================
--- head/usr.sbin/mergemaster/mergemaster.sh	Fri Mar 13 07:23:58 2009	(r189760)
+++ head/usr.sbin/mergemaster/mergemaster.sh	Fri Mar 13 07:34:05 2009	(r189761)
@@ -671,7 +671,7 @@ find ${TEMPROOT} -type f -size 0 -delete
 # Build the mtree database in a temporary location.
 MTREENEW=`mktemp -t mergemaster.mtree`
 case "${PRE_WORLD}" in
-'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREENEW} 2>/dev/null
+'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${MTREENEW} 2>/dev/null
     ;;
 *) # We don't want to mess with the mtree database on a pre-world run.
    ;;
@@ -1037,10 +1037,10 @@ done # This is for the do way up there a
 echo ''
 echo "*** Comparison complete"
 
-if [ -f "${DESTDIR}${MTREENEW}" ]; then
+if [ -f "${MTREENEW}" ]; then
   echo "*** Saving mtree database for future upgrades"
-  test -e "${MTREEFILE}" && unlink ${MTREEFILE}
-  mv ${DESTDIR}${MTREENEW} ${DESTDIR}${MTREEFILE}
+  test -e "${DESTDIR}${MTREEFILE}" && unlink ${DESTDIR}${MTREEFILE}
+  mv ${MTREENEW} ${DESTDIR}${MTREEFILE}
 fi
 
 echo ''



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903130734.n2D7Y5Xc055843>