mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
- Add checking of empty directories to leftover check
PR: ports/71363 Submitted by: leeym
This commit is contained in:
parent
211310fbac
commit
d289501472
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=139299
30
devel/porttools/files/patch-cmd_test.in
Normal file
30
devel/porttools/files/patch-cmd_test.in
Normal file
@ -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
|
30
ports-mgmt/porttools/files/patch-cmd_test.in
Normal file
30
ports-mgmt/porttools/files/patch-cmd_test.in
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user