aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-07-16 02:53:23 +0800
committerpav <pav@FreeBSD.org>2005-07-16 02:53:23 +0800
commitf05a25808816c5e09fdfae17fdaef00e8a489e78 (patch)
tree1efa99490dc5572e58b9c7b883a9453532499da2 /devel
parent387cc248722b2240a18882ff271eef5cd356c5a6 (diff)
downloadfreebsd-ports-gnome-f05a25808816c5e09fdfae17fdaef00e8a489e78.tar.gz
freebsd-ports-gnome-f05a25808816c5e09fdfae17fdaef00e8a489e78.tar.zst
freebsd-ports-gnome-f05a25808816c5e09fdfae17fdaef00e8a489e78.zip
- Add checking of empty directories to leftover check
PR: ports/71363 Submitted by: leeym
Diffstat (limited to 'devel')
-rw-r--r--devel/porttools/files/patch-cmd_test.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/devel/porttools/files/patch-cmd_test.in b/devel/porttools/files/patch-cmd_test.in
new file mode 100644
index 000000000000..c73b616f58bc
--- /dev/null
+++ b/devel/porttools/files/patch-cmd_test.in
@@ -0,0 +1,30 @@
+--- cmd_test.in.orig Sat Aug 7 06:10:14 2004
++++ cmd_test.in Tue Sep 7 01:25:08 2004
+@@ -178,7 +178,7 @@
+ done
+
+ # Check for extra files left
+-echo "===> Extra files check"
++echo "===> Extra files and directories check"
+ if [ -d ${PREFIX} -a "${USE_X_PREFIX}" != "yes" ]
+ then
+ # Remove PREFIX from the extra files list
+@@ -186,6 +186,9 @@
+ find ${PREFIX} ! -type d | \
+ egrep -v "${PREFIX}/share/nls/(POSIX|en_US.US-ASCII)" | \
+ sed -e "s,^${PREFIX}/,,"
++ sudo find ${LOCALBASE}/ -type d | sed "s,^${LOCALBASE}/,," | sort > ${PREFIX}.PLIST_DIRS.before
++ sudo find ${PREFIX}/ -type d | sed "s,^${PREFIX}/,," | sort > ${PREFIX}.PLIST_DIRS.after
++ comm -13 ${PREFIX}.PLIST_DIRS.before ${PREFIX}.PLIST_DIRS.after | sort -r | awk '{print "@unexec rmdir %D/"$1" 2>/dev/null || true"}'
+ fi
+
+ # Finish with a clean workspace
+@@ -196,7 +199,7 @@
+ if [ "${USE_X_PREFIX}" != "yes" -a -d ${PREFIX} ]
+ then
+ echo "===> Removing existing ${PREFIX} dir"
+- [ "${PREFIX}" != "${LOCALBASE}" ] && sudo rm -rf ${PREFIX}
++ [ "${PREFIX}" != "${LOCALBASE}" ] && sudo rm -rf ${PREFIX} ${PREFIX}.PLIST_DIRS.before ${PREFIX}.PLIST_DIRS.after
+ fi
+ sudo rm -rf ${PKG_DBDIR}
+ fi