From: Matthew Dillon Date: Fri, 6 May 2011 08:39:16 +0000 (-0700) Subject: make upgrade - Allow removal of protected files X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/ca1740ee73f11da9a5e831aa706e62df3f13bdd6 make upgrade - Allow removal of protected files * chflags -Rf noschg from the files to be deleted list before attempting to rm -rf . * Fixes the proper removal of obsolete or moved libraries. --- diff --git a/etc/Makefile b/etc/Makefile index 6302994..2b97caa 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -98,6 +98,7 @@ remove-obsolete-files: @for item in ${TO_REMOVE}; do \ if [ -e ${DESTDIR}$${item} -o -L ${DESTDIR}$${item} ]; then \ echo "${DESTDIR}$${item}"; \ + chflags -Rf noschg "${DESTDIR}$${item}"; \ rm -rf "${DESTDIR}$${item}"; \ fi; \ done