aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2014-11-05 15:14:21 +0800
committerantoine <antoine@FreeBSD.org>2014-11-05 15:14:21 +0800
commit2f205de5e275d6fbf77a7523823a0ccdc0ed33db (patch)
treeca0dc7c117ed14c934d89631188d481ed7835c8a /Mk
parent7721c07726182ad20a25a77c8037dcabd2972d55 (diff)
downloadfreebsd-ports-gnome-2f205de5e275d6fbf77a7523823a0ccdc0ed33db.tar.gz
freebsd-ports-gnome-2f205de5e275d6fbf77a7523823a0ccdc0ed33db.tar.zst
freebsd-ports-gnome-2f205de5e275d6fbf77a7523823a0ccdc0ed33db.zip
- During makeplist, emit only empty directories inside prefix and
directories outside prefix - Whitelisting orphan directories not starting with / is no longer necessary - Adjust missing directories check to use a list of all directories instead of the dirs from make-plist Differential Revision: https://reviews.freebsd.org/D1101 Reviewed by: bapt With hat: portmgr
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/check-stagedir.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh
index 39224f5e5ad3..d07b9c8b88f0 100644
--- a/Mk/Scripts/check-stagedir.sh
+++ b/Mk/Scripts/check-stagedir.sh
@@ -255,8 +255,12 @@ generate_plist() {
### HANDLE DIRS
cat ${WRKDIR}/.plist-dirs-unsorted ${WRKDIR}/.mtree \
| sort -u >${WRKDIR}/.traced-dirs
- find -sd ${STAGEDIR} -type d | sed -e "s,^${STAGEDIR},,;/^$/d" \
+ find ${STAGEDIR} -type d | sed -e "s,^${STAGEDIR},,;/^$/d" | sort \
+ >${WRKDIR}/.staged-dirrms-sorted
+ find -sd ${STAGEDIR}${PREFIX} -type d -empty | sed -e "s,^${STAGEDIR},,;\,^${PREFIX}$,d;/^$/d" \
>${WRKDIR}/.staged-dirs-dfs
+ find -sd ${STAGEDIR} -type d ! -path "${STAGEDIR}${PREFIX}/*" | sed -e "s,^${STAGEDIR},,;\,^${PREFIX}$,d;/^$/d" \
+ >>${WRKDIR}/.staged-dirs-dfs
sort ${WRKDIR}/.staged-dirs-dfs >${WRKDIR}/.staged-dirs-sorted
awk '{print FNR, $0}' ${WRKDIR}/.staged-dirs-dfs \
>${WRKDIR}/.staged-dirs-dfs-sorted
@@ -274,7 +278,6 @@ check_orphans_from_plist() {
# Handle whitelisting
while read path; do
case "${path}" in
- *'@dir '[^/]*) ;;
*.bak) ;;
*.orig) ;;
*/.DS_Store) ;;
@@ -324,7 +327,7 @@ check_missing_plist_items() {
rm -rf ${WRKDIR}/.missing-dirs > /dev/null 2>&1 || :
mkdir ${WRKDIR}/.missing-dirs
comm -23 ${WRKDIR}/.plist-dirs-sorted-no-comments \
- ${WRKDIR}/.staged-dirs-sorted > ${WRKDIR}/.missing-plist-dirs
+ ${WRKDIR}/.staged-dirrms-sorted > ${WRKDIR}/.missing-plist-dirs
# Creates the dirs in WRKDIR/.missing-dirs and ensure spaces are
# quoted.
sed -e "s,^,${WRKDIR}/.missing-dirs," \