2007-11-28 22:10:28 +01:00
|
|
|
#!/bin/bash
|
2007-11-29 04:20:24 +01:00
|
|
|
#
|
|
|
|
# finddeps - find packages that depend on a given depname
|
|
|
|
#
|
2007-11-28 22:10:28 +01:00
|
|
|
|
|
|
|
if [ "$1" = "" ]; then
|
2007-11-29 04:20:24 +01:00
|
|
|
echo "usage: finddeps <depname>"
|
|
|
|
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
|
2007-11-28 22:10:28 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
match=$1
|
2007-11-29 04:20:24 +01:00
|
|
|
tld=$(pwd)
|
2007-11-28 22:10:28 +01:00
|
|
|
|
2007-11-29 04:20:24 +01:00
|
|
|
for d in $(find . -type d); 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
|
2008-01-04 19:40:15 +01:00
|
|
|
echo "$d (depends)"
|
2007-11-29 04:20:24 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
for dep in "${makedepends[@]}"; do
|
|
|
|
# lose the version comaparator, if any
|
|
|
|
depname=${dep%%[<>=]*}
|
|
|
|
if [ "$depname" = "$match" ]; then
|
2008-01-04 19:40:15 +01:00
|
|
|
echo "$d (makedepends)"
|
2007-11-29 04:20:24 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
cd $tld
|
2007-11-28 22:10:28 +01:00
|
|
|
done
|
|
|
|
|
2007-11-29 04:20:24 +01:00
|
|
|
# vim:ft=sh:ts=4:sw=4:et:
|