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
This commit is contained in:
parent
711f10ae9f
commit
baf4f1f082
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258456
@ -492,8 +492,14 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk"
|
||||
# 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}:"
|
||||
|
Loading…
Reference in New Issue
Block a user