xbps-src: make the 'show-revdeps' target work with the shlibs world order.
This commit is contained in:
parent
d7f8091061
commit
e1b20273e6
|
@ -23,11 +23,9 @@
|
|||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#-
|
||||
|
||||
show_pkg_revdeps()
|
||||
_show_hard_pkg_deps()
|
||||
{
|
||||
local f revdepname tmplf
|
||||
|
||||
[ -z "$1" ] && return 1
|
||||
local f tmplf revdepname
|
||||
|
||||
for f in $(find ${XBPS_SRCPKGDIR} -type f -name \*template); do
|
||||
if ! egrep -q "^Add_dependency[[:blank:]]+(run|full|build)[[:blank:]]+${1}([[:space:]]+\".*\")*$" $f; then
|
||||
|
@ -42,3 +40,34 @@ show_pkg_revdeps()
|
|||
echo $revdepname
|
||||
done
|
||||
}
|
||||
|
||||
_show_shlib_pkg_deps()
|
||||
{
|
||||
local f j
|
||||
|
||||
for f in $(find ${XBPS_SRCPKGDIR} -type f -name *.rshlibs); do
|
||||
for j in ${1}; do
|
||||
if grep -q "$j" "$f"; then
|
||||
revdepname=$(basename $f)
|
||||
echo "${revdepname%.rshlibs}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
show_pkg_revdeps()
|
||||
{
|
||||
local SHLIBS_MAP="$XBPS_COMMONVARSDIR/mapping_shlib_binpkg.txt"
|
||||
|
||||
[ -z "$1" ] && return 1
|
||||
|
||||
shlibs=$(grep "$1" $SHLIBS_MAP)
|
||||
if [ -n "$shlibs" ]; then
|
||||
# pkg provides shlibs
|
||||
_show_shlib_pkg_deps "$shlibs"
|
||||
else
|
||||
# pkg does not provide shlibs
|
||||
_show_hard_pkg_deps "$1"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue