Date: Fri, 22 Nov 2013 00:06:11 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258456 - head/usr.sbin/mergemaster Message-ID: <201311220006.rAM06BYw021386@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Fri Nov 22 00:06:11 2013 New Revision: 258456 URL: http://svnweb.freebsd.org/changeset/base/258456 Log: Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is nmtree. The mtree output used by mergemaster in this case was clearly not meant for computer consumption and an approach based on -f <file1> -f <file2> would probalby be a better idea, but this is a minimal change. MFC after: 3 days X-MFC-with: r258437 Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Thu Nov 21 23:09:07 2013 (r258455) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Nov 22 00:06:11 2013 (r258456) @@ -492,8 +492,14 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCED # files the user changed from the reference files. # if [ -n "${AUTO_UPGRADE}" -a -s "${MTREEFILE}" ]; then + # Force FreeBSD 9 compatible output when available. + if mtree -F freebsd9 -c -p /var/empty/ > /dev/null 2>&1; then + MTREE_FLAVOR="-F freebsd9" + else + MTREE_FLAVOR= + fi CHANGED=: - for file in `mtree -eqL -f ${MTREEFILE} -p ${DESTDIR}/ \ + for file in `mtree -eqL ${MTREE_FLAVOR} -f ${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED}${DESTDIR}/${file}:"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311220006.rAM06BYw021386>