Mercurial > hg > sonic-visualiser
comparison misc/debian-dependencies.sh @ 460:f84413dd5a7a
Avoid trying to look up non-file dependencies
author | Chris Cannam |
---|---|
date | Thu, 21 Jul 2011 09:56:57 +0100 |
parents | 84fd4bb8d656 |
children | ac805901f02a |
comparison
equal
deleted
inserted
replaced
457:8f0c1b0f17fa | 460:f84413dd5a7a |
---|---|
11 rfile=/tmp/redundant_$$ | 11 rfile=/tmp/redundant_$$ |
12 | 12 |
13 trap "rm -f $pfile $rfile" 0 | 13 trap "rm -f $pfile $rfile" 0 |
14 echo | 14 echo |
15 | 15 |
16 ldd "$target" | awk '{ print $3; }' | while read lib; do | 16 ldd "$target" | awk '{ print $3; }' | grep '^/' | while read lib; do |
17 if test -n "$lib" ; then | 17 if test -n "$lib" ; then |
18 dpkg-query -S "$lib" | 18 dpkg-query -S "$lib" |
19 fi | 19 fi |
20 done | grep ': ' | awk -F: '{ print $1 }' | sort | uniq > $pfile | 20 done | grep ': ' | awk -F: '{ print $1 }' | sort | uniq > $pfile |
21 | 21 |
22 echo "Packages providing required libraries:" | 22 echo "Packages providing required libraries:" |
23 cat $pfile | 23 cat $pfile |
24 echo | 24 echo |
25 | 25 |
26 for p in `cat $pfile`; do | 26 for p in `cat $pfile`; do |
27 echo Looking at $p 1>&2 | |
27 apt-cache showpkg "$p" | grep '^ ' | grep ',' | awk -F, '{ print $1; }' | \ | 28 apt-cache showpkg "$p" | grep '^ ' | grep ',' | awk -F, '{ print $1; }' | \ |
28 while read d; do | 29 while read d; do |
29 if grep -q '^'$d'$' $pfile; then | 30 if grep -q '^'$d'$' $pfile; then |
30 echo $p | 31 echo $p |
31 fi | 32 fi |