Page MenuHomeFreeBSD

D41945.id127825.diff
No OneTemporary

D41945.id127825.diff

Index: usr.sbin/freebsd-update/freebsd-update.sh
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.sh
+++ usr.sbin/freebsd-update/freebsd-update.sh
@@ -2907,12 +2907,16 @@
sort -k 1,1 -t '|' $1 |
tr '|' ' ' |
while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do
- # A file may change to a directory on upgrade (PR273661).
- # If that happens rm the file first so that install can create
- # the directory in its place.
+ # A file may change to a directory on upgrade (PR273661) or
+ # vice-versa. If that happens rm the file or rm -rf the
+ # directory first so that install can create the directory or
+ # file in its place.
if [ -e "${BASEDIR}/${FPATH}" ]; then
if [ ${TYPE} = d ] && ! [ -d "${BASEDIR}/${FPATH}" ]; then
rm -f -- "${BASEDIR}/${FPATH}"
+ elif [ ${TYPE} = f -o ${TYPE} = L ] && \
+ [ -d "${BASEDIR}/${FPATH}" ]; then
+ rm -rf -- "${BASEDIR}/${FPATH}"
fi
fi
case ${TYPE} in
@@ -2969,11 +2973,8 @@
d)
rmdir ${BASEDIR}/${FPATH}
;;
- f)
- rm ${BASEDIR}/${FPATH}
- ;;
- L)
- rm ${BASEDIR}/${FPATH}
+ f|L)
+ rm -f "${BASEDIR}/${FPATH}"
;;
esac
done < killfiles

File Metadata

Mime Type
text/plain
Expires
Sat, Jun 20, 10:54 PM (4 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34131639
Default Alt Text
D41945.id127825.diff (1 KB)

Event Timeline