change repo
[vuplus_openembedded] / contrib / dependsgraph / dependsgraph.sh
1 #!/bin/bash
2 #
3 # This script attempts to repair the use of creating
4 # dependency graphs of packages.
5 #
6 # This got unusuable, (and broken beyond repair?) with
7 # enhancements to bitbake in its dependency tracking.
8 #
9 # This script is a hack. It works for me.
10 #
11 # Apply the patch from this bug report to bitbake
12 # (if not yet upstream), tested against r1152 of
13 # svn://svn.berlios.de/bitbake/branches/bitbake-1.8
14 #
15 # http://bugs.openembedded.net/show_bug.cgi?id=5002
16 #
17
18 IGNORE_DEPENDS=" \
19 -native -dbg -dev -doc -info -locale -cross -initial -r[0-9]* \
20 -intermediate -linux-gcc -linux-binutils -linux-libc-for-gcc linux-libc-headers \
21 "
22
23 IGNORE_DASHED="dashed]"
24
25 if [ ! -f depends.dot ]; then
26   echo "Cannot find ./depends.dot"
27 #  exit
28 fi
29
30 which dot
31 if [ ! $? -eq 0 ]; then
32   echo "Install graphviz on your host."
33   exit
34 fi
35
36 echo -n >/tmp/delete.sed
37 for IGNORE in $IGNORE_DEPENDS $IGNORE_DASHED ;
38 do
39   echo /$IGNORE/d >>/tmp/delete.sed
40 done
41
42 #cat /tmp/delete.sed
43
44 # first, delete a lot of (noisy) nodes and edges.
45 sed -f /tmp/delete.sed depends.dot >reduced.dot
46
47 # create a PNG
48 dot -v -Tpng -o depends.png reduced.dot
49
50 # show it
51 gthumb depends.png