mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-28 01:06:17 +00:00
- 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
This commit is contained in:
parent
b917e1f509
commit
fd76fd9625
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=372177
@ -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," \
|
||||
|
Loading…
Reference in New Issue
Block a user