From 6e54a21887c398c75babc64dadb4dd83bb6b94bf Mon Sep 17 00:00:00 2001 From: James Meyer Date: Wed, 22 Jul 2009 20:04:17 -0500 Subject: find_deps.sh: add new script to locate packages that depend on any given pkg. for instance to check for pkgs that need libjpeg in core-testing cd /data/LinHES-PKGBUILD/abs/core-testing find_deps.sh libjpeg ./libmng (depends) ./jasper (depends) ./libwmf (depends) ./pil (depends) ./fbsplash (depends) ./qt3 (depends) ./fltk (depends) ./perl_modules/perl-tk (depends) ./libtiff (depends) ./directfb (depends) ./php (makedepends) ./php (makedepends) ./mjpegtools (depends) --- build_tools/bin/find_deps.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 build_tools/bin/find_deps.sh diff --git a/build_tools/bin/find_deps.sh b/build_tools/bin/find_deps.sh new file mode 100755 index 0000000..914088c --- /dev/null +++ b/build_tools/bin/find_deps.sh @@ -0,0 +1,38 @@ +#!/bin/bash +if [ "$1" = "" ]; then + echo "usage: finddeps " + echo "" + echo "Find packages that depend on a given depname." + echo "Run this script from the top-level directory of your ABS tree." + echo "" + exit 0 +fi + +match=$1 +tld=$(pwd) + +#for d in $(find . -type d ); do +for d in $(find . -type d ! -path "*/pkg/*" ! -path "*/src/*"); do + cd ${d} + if [ -f PKGBUILD ]; then + unset pkgname depends makedepends + . PKGBUILD + for dep in "${depends[@]}"; do + # lose the version comaparator, if any + depname=${dep%%[<>=]*} + if [ "$depname" = "$match" ]; then + echo "$d (depends)" + fi + done + for dep in "${makedepends[@]}"; do + # lose the version comaparator, if any + depname=${dep%%[<>=]*} + if [ "$depname" = "$match" ]; then + echo "$d (makedepends)" + fi + done + fi + cd $tld +done + +# vim:ft=sh:ts=4:sw=4:et: -- cgit v0.12