Improve dependency check:

When removing category/port - look if other ports' Makefiles contain
`/port' rather than `category/port', since the later misses things
like `${.CURDIR}/../port'
This commit is contained in:
Vasil Dimov 2006-05-02 09:16:10 +00:00
parent b7ca3be57f
commit 8529c41f37
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=161174

View file

@ -113,11 +113,12 @@ check_dep()
fi
# check if some port mentions the port to be deleted
portdir_grep="/`basename ${catport}`"
r="`find ${PORTSDIR} -mindepth 3 -maxdepth 3 -name "Makefile*" \
|xargs grep -Hw ${catport} \
|xargs grep -Hw ${portdir_grep} \
|grep -vE "^(${rmcatports})" || :`"
if [ -n "${r}" ] ; then
log "${catport}: some ports mention ${catport} in their Makefiles:"
log "${catport}: some ports mention ${portdir_grep} in their Makefiles:"
printf "%s\n" "${r}" >&2
err=1
fi