]> git.donarmstrong.com Git - cran2deb.git/blob - pkg/trunk/diagnose
pbuilder: include xvfb, xauth, and xfont-base in base.tgz
[cran2deb.git] / pkg / trunk / diagnose
1 #!/usr/bin/rc
2
3 #success=`{ls var/results/*.deb | wc -l}
4 #echo $success successful packages
5 #total=$success
6 total=0
7
8 fn count_dup { sort | uniq -c | sort -n}# | awk '$1 > 1{print}' }
9 fn collapse { a=`{echo $^* | sed -e 's/ | /|/g'}; echo $^a }
10 echo 'warnings:'
11 {for (x in (warn/* /dev/null)) cut -d: -f3- <$x | sort -u} | awk '{print $1}' | count_dup
12 echo
13
14 faildep=('^Error: package ''.*'' could not be loaded'
15      '|' '^ERROR: lazy loading failed for package ''.*'''
16      '|' '^[[:space:]]*package .* is not available'
17      '|' 'there is no package called ''.*''')
18 faildeb='Unsupported SystemRequirements:'
19 faillic=('No acceptable license: ')
20 failspc=': No space left on device'
21 failhdr='error: .*\.hp?p?: No such file or directory'
22 faildep=`{collapse $faildep}
23 faildep=$^faildep
24 faillic=`{collapse $faillic}
25 faillic=$^faillic
26 other=''
27
28 nfaildep=`{grep -El $faildep fail/* /dev/null | wc -l}
29 echo $nfaildep failed R dependencies.
30 grep -Eh $faildep fail/* | count_dup
31 other=$faildep
32 #total=$total+$nfaildep
33 echo
34
35 nfaillic=`{grep -El $faillic `{grep -EL $other fail/*} /dev/null | wc -l}
36 echo $nfaillic failed licenses.
37 grep -Eh $faillic `{grep -EL $other fail/*} | count_dup
38 other=$other^'|'^$faillic
39 total=$total+$nfaillic
40 echo
41
42 nfailspc=`{grep -El $failspc `{grep -EL $other fail/*} /dev/null | wc -l}
43 echo $nfailspc out of space
44 other=$other^'|'^$failspc
45 total=$total+$nfailspc
46 echo
47
48 nfailhdr=`{grep -El $failhdr `{grep -EL $other fail/*} /dev/null | wc -l}
49 echo $nfailhdr missing C header
50 grep -Eh $failhdr `{grep -EL $other fail/* /dev/null} | count_dup
51 other=$other^'|'^$failhdr
52 total=$total+$nfailhdr
53 echo
54
55 nfaildeb=`{grep -El $faildeb `{grep -EL $other fail/*} /dev/null | wc -l}
56 echo $nfaildeb system requirement failures.
57 grep -Eh $faildeb `{grep -EL $other fail/* /dev/null} | count_dup
58 other=$other^'|'^$faildeb
59 total=$total+$nfaildeb
60 echo
61
62 nfailother=`{hoc -e `{grep -EL $other fail/* /dev/null | wc -l}^-1}
63 echo $nfailother other failures.
64
65 #total=`{hoc -e $total}
66 #succrate=`{hoc -e $success/'('$total')*100'}
67 #echo $succrate% success rate '('$total' total)'
68 #total=`{hoc -e $total-$nfaillic-$nfailspc-$nfailhdr}
69 #succrate=`{hoc -e $success/'('$total')*100'}
70 #echo $succrate% success rate without licensing, space and Debian deps issues '('$total' total)'
71 grep -EL $other fail/* /dev/null | xargs tail -n 20
72