xbps-src: 'show-revdeps' now looks for hard deps and rshlibs, even faster.

This commit is contained in:
Juan RP 2011-11-18 10:48:29 +01:00
parent 74faae022e
commit 202dfd9c26

View file

@ -25,12 +25,12 @@
_show_hard_pkg_deps() _show_hard_pkg_deps()
{ {
local f tmplf revdepname local f tmplf deps revdepname _pkgn
for f in $(find ${XBPS_SRCPKGDIR} -type f -name \*template); do _pkgn=$(echo "$1"|sed 's|\+|\\+|g')
if ! egrep -q "^Add_dependency[[:blank:]]+(run|full|build)[[:blank:]]+${1}([[:space:]]+\".*\")*$" $f; then deps=$(grep -E "^Add_dependency[[:blank:]]+(run|full|build)[[:blank:]]+${_pkgn}([[:space:]]+\".*\")*$" $XBPS_SRCPKGDIR/*/*template|sed 's/:Add_dependency.*//g')
continue for f in ${deps}; do
fi [ -h "$(dirname $f)" ] && continue
tmplf=$(basename $f) tmplf=$(basename $f)
if [ "$tmplf" != template ]; then if [ "$tmplf" != template ]; then
revdepname=${tmplf%.template} revdepname=${tmplf%.template}
@ -74,8 +74,7 @@ show_pkg_revdeps()
if [ -n "$shlibs" ]; then if [ -n "$shlibs" ]; then
# pkg provides shlibs # pkg provides shlibs
_show_shlib_pkg_deps "$shlibs" _show_shlib_pkg_deps "$shlibs"
else
# pkg does not provide shlibs
_show_hard_pkg_deps "$1"
fi fi
# show pkgs that use Add_dependency
_show_hard_pkg_deps "$1"
} }