# HG changeset patch # User Chris Cannam # Date 1411557140 -3600 # Node ID ac805901f02a6076afcce99966f8656a8d6be081 # Parent 129b679734d042fd25d13916c4d383fec4e0f4d6 Output for control file diff -r 129b679734d0 -r ac805901f02a misc/debian-dependencies.sh --- a/misc/debian-dependencies.sh Wed Sep 24 12:08:51 2014 +0100 +++ b/misc/debian-dependencies.sh Wed Sep 24 12:12:20 2014 +0100 @@ -11,7 +11,7 @@ rfile=/tmp/redundant_$$ trap "rm -f $pfile $rfile" 0 -echo +echo 1>&2 ldd "$target" | awk '{ print $3; }' | grep '^/' | while read lib; do if test -n "$lib" ; then @@ -19,24 +19,24 @@ fi done | grep ': ' | awk -F: '{ print $1 }' | sort | uniq > $pfile -echo "Packages providing required libraries:" -cat $pfile -echo +echo "Packages providing required libraries:" 1>&2 +cat $pfile 1>&2 +echo 1>&2 for p in `cat $pfile`; do echo Looking at $p 1>&2 apt-cache showpkg "$p" | grep '^ ' | grep ',' | awk -F, '{ print $1; }' | \ while read d; do if grep -q '^'$d'$' $pfile; then - echo $p + echo $p 1>&2 fi done done | sort | uniq > $rfile -echo "Packages that can be eliminated because other packages depend on them:" -cat $rfile -echo +echo "Packages that can be eliminated because other packages depend on them:" 1>&2 +cat $rfile 1>&2 +echo 1>&2 -echo "Remaining required packages:" -cat $pfile $rfile | sort | uniq -u +cat $pfile $rfile | sort | uniq -u | sed 's/$/,/' | fmt -1000 | sed 's/^/Depends: /' +