]> git.donarmstrong.com Git - cran2deb.git/blob - trunk/exec/diagnose
cd1e89693eb9f6985c6727581246d117db0d734b
[cran2deb.git] / trunk / exec / diagnose
1 #!/bin/sh
2 last='natural join (select system,package,max(id) as id from builds where package not in (select package from blacklist_packages) group by package,system)'
3
4 echo blacklist:
5 sqlite3 -header -column /var/cache/cran2deb/cran2deb.db "select count(*) as total_blacklist,sum(nonfree) as num_nonfree, sum(obsolete) as num_obsolete, sum(broken_dependency) as num_broke_depend, sum(unsatisfied_dependency) as num_unsat_depend, sum(breaks_cran2deb) as num_break_cran2deb from blacklist_packages;"
6
7 echo bad licenses:
8 sqlite3 /var/cache/cran2deb/cran2deb.db "select system,count(package),group_concat(package) from builds $last where success = 0 and log like '%No acceptable license:%' group by system;"
9 echo
10 echo bad system req:
11 sqlite3 /var/cache/cran2deb/cran2deb.db "select system,count(package),group_concat(package) from builds $last where success = 0 and log like '%do not know what to do with SystemRequirement:%' group by system;"
12 echo
13 echo 'c/c++ error (maybe):'
14 sqlite3 /var/cache/cran2deb/cran2deb.db "select system,count(package),group_concat(package) from builds $last where success = 0 and (log like '%error: %.h: No such file or directory%' or log like '%error: %.hpp: No such file or directory%') group by system;"
15 echo
16 echo 'missing r-cran- package:'
17 sqlite3 /var/cache/cran2deb/cran2deb.db "select system,count(package),group_concat(package) from builds $last where success = 0 and (log like \"%E: Couldn't find package r-cran-%\") group by system;"
18
19 echo
20 echo 'missing r-cran- package: (frequency, missing package)'
21 cran2deb latest_log $(sqlite3 /var/cache/cran2deb/cran2deb.db "select system,count(package),group_concat(package) from builds $last where success = 0 and (log like \"%E: Couldn't find package r-cran-%\") group by system;" | head -n 1 | cut -d'|' -f3- | tr ',' ' ') 2>/dev/null | grep "^E: Couldn't find package r-cran-" | awk '{print $5}' | sort | uniq -c | sort -rn
22
23 echo
24 echo 'lintian:'
25 sqlite3 /var/cache/cran2deb/cran2deb.db "select system,count(package),group_concat(package) from builds $last where success = 0 and (log like \"%E: r-cran-%\") group by system;"
26 echo
27 echo some other dependency failure:
28 sqlite3 /var/cache/cran2deb/cran2deb.db "select system,count(package),group_concat(package) from builds $last where success = 0 and (log like '%Error: package % could not be loaded%' or log like '%ERROR: lazy loading failed for package%' or log like '%is not available%' or log like '%there is no package called%') and not (log like \"%E: Couldn't find package r-cran-%\") group by system;"
29
30