make upgrade - Allow removal of protected files
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 6 May 2011 08:39:16 +0000 (01:39 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 6 May 2011 08:39:16 +0000 (01:39 -0700)
* chflags -Rf noschg <blah> from the files to be deleted list
  before attempting to rm -rf <blah>.

* Fixes the proper removal of obsolete or moved libraries.

etc/Makefile

index 6302994..2b97caa 100644 (file)
@@ -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