etcupdate: directly use diff3(1) instead of merge(1)
During the last attempt to rmeove GNU rcs, 2 blockers were spotted: We need an ident(1) and etcupdate(8) uses merge(1). Now nothing should prevent to remove rcs from base Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D7401
This commit is contained in:
parent
767fa24126
commit
07e7095881
@ -814,15 +814,17 @@ merge_file()
|
|||||||
local res
|
local res
|
||||||
|
|
||||||
# Try the merge to see if there is a conflict.
|
# Try the merge to see if there is a conflict.
|
||||||
merge -q -p ${DESTDIR}$1 ${OLDTREE}$1 ${NEWTREE}$1 >/dev/null 2>&3
|
diff3 -E -m ${DESTDIR}$1 ${OLDTREE}$1 ${NEWTREE}$1 > /dev/null 2>&3
|
||||||
res=$?
|
res=$?
|
||||||
case $res in
|
case $res in
|
||||||
0)
|
0)
|
||||||
# No conflicts, so just redo the merge to the
|
# No conflicts, so just redo the merge to the
|
||||||
# real file.
|
# real file.
|
||||||
log "merge ${DESTDIR}$1 ${OLDTREE}$1 ${NEWTREE}$1"
|
log "diff3 -E -m ${DESTDIR}$1 ${OLDTREE}$1 ${NEWTREE}$1"
|
||||||
if [ -z "$dryrun" ]; then
|
if [ -z "$dryrun" ]; then
|
||||||
merge ${DESTDIR}$1 ${OLDTREE}$1 ${NEWTREE}$1
|
temp=$(mktemp -t etcupdate)
|
||||||
|
diff3 -E -m ${DESTDIR}$1 ${OLDTREE}$1 ${NEWTREE}$1 > ${temp}
|
||||||
|
mv -f ${temp} ${DESTDIR}$1
|
||||||
fi
|
fi
|
||||||
post_install_file $1
|
post_install_file $1
|
||||||
echo " M $1"
|
echo " M $1"
|
||||||
@ -832,10 +834,10 @@ merge_file()
|
|||||||
# the conflicts directory.
|
# the conflicts directory.
|
||||||
if [ -z "$dryrun" ]; then
|
if [ -z "$dryrun" ]; then
|
||||||
install_dirs $NEWTREE $CONFLICTS $1
|
install_dirs $NEWTREE $CONFLICTS $1
|
||||||
log "cp -Rp ${DESTDIR}$1 ${CONFLICTS}$1"
|
log "diff3 -m -A ${DESTDIR}$1 ${CONFLICTS}$1"
|
||||||
cp -Rp ${DESTDIR}$1 ${CONFLICTS}$1 >&3 2>&1
|
diff3 -m -A -L "yours" -L "original" -L "new" \
|
||||||
merge -A -q -L "yours" -L "original" -L "new" \
|
${DESTDIR}$1 ${OLDTREE}$1 ${NEWTREE}$1 > \
|
||||||
${CONFLICTS}$1 ${OLDTREE}$1 ${NEWTREE}$1
|
${CONFLICTS}$1
|
||||||
fi
|
fi
|
||||||
echo " C $1"
|
echo " C $1"
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user