xbps-src: 'show-revdeps' now works with pkgs containing grep meta-chars.

This commit is contained in:
Juan RP 2011-11-17 10:12:14 +01:00
parent ae0e7aa2bb
commit 74cd8ace29

View file

@ -43,9 +43,11 @@ _show_hard_pkg_deps()
_show_shlib_pkg_deps()
{
local f j
local f j soname
revshlibs=$(egrep "^${1}$" ${XBPS_SRCPKGDIR}/*/*.rshlibs)
soname=$(echo "$1"|sed 's|\+|\\+|g')
revshlibs=$(grep -E "^${soname}$" ${XBPS_SRCPKGDIR}/*/*.rshlibs)
for f in ${revshlibs}; do
unset pkg revdepname tmprev
revdepname=$(basename "$f")
@ -62,10 +64,13 @@ _show_shlib_pkg_deps()
show_pkg_revdeps()
{
local SHLIBS_MAP="$XBPS_COMMONVARSDIR/mapping_shlib_binpkg.txt"
local _pkgn shlibs
[ -z "$1" ] && return 1
shlibs=$(egrep "${1}[[:blank:]]+.*$" $SHLIBS_MAP|awk '{print $1}')
_pkgn=$(echo "$1"|sed 's|\+|\\+|g')
shlibs=$(grep -E "^lib.*\.so\.[[:digit:]]+[[:blank:]]+${_pkgn}[[:blank:]]+.*$" $SHLIBS_MAP|awk '{print $1}')
if [ -n "$shlibs" ]; then
# pkg provides shlibs
_show_shlib_pkg_deps "$shlibs"