]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blame - wwwbin/consistency-check.sh
freshness.sh: include timing information
[projects/pld-ftp-admin.git] / wwwbin / consistency-check.sh
CommitLineData
ed1ec331
ER
1#!/bin/sh
2
3export LC_ALL=C
4
5filter_deps() {
6 grep -Ev "(FileDigestParameterized|unsatisfied dependencies found|-multilib-|zsh/latest/functions|VirtualBox.*libc\.so\.6|obextool.*libc\.so\.6)" | \
7 grep -v "uname(release)" |
8 grep -v "/eclipse/"
9}
10
cef29ec5 11# group errors by same error kind
ed1ec331
ER
12group_deps() {
13 local t=$(mktemp)
14 cat > $t
15 sed -ne 's/.*req \(.*\) not found.*/\1/p' $t | sort -u | while read dep; do
16 grep -F "req $dep not found" $t
17 done
18 rm -f $t
19}
20
cef29ec5
ER
21# convert pkg name to src.rpm name
22# uses poldek
cef29ec5
ER
23pkg2src() {
24 local t=$(mktemp)
cef29ec5
ER
25 local t3=$(mktemp)
26
27 # save input
28 cat > $t
29
48d8fed6 30 # create list of N-V-R.A.rpm -> src-N pairs from error report
cef29ec5 31 # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found
48d8fed6
JR
32 sed -ne 's/error: \(.*\): req .* not found/\1/p' $t | sort -u | \
33 xargs -d '\n' poldek --noignore -Q "$@" --cmd ls -q -s | \
34 sed -rne "s/^([^\t ]+)[\t ]+(.+)-[^-]+-[^-]+\.src\.rpm$/\1\t\2/p" >$t3
cef29ec5 35
48d8fed6 36 local pkg error message srpm
cef29ec5
ER
37 while read error pkg message; do
38 # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found
39 srpm=$(awk -vpkg="${pkg%:}" '$1 == pkg {printf("%s.spec", $2)}' $t3)
789fadf6
ER
40 if [ -z "$srpm" ]; then
41 echo >&2 "srpms: No match for [${pkg%:}]"
42 fi
cef29ec5
ER
43 echo "$error [$srpm] $pkg $message"
44 done < $t
45
48d8fed6 46 rm -f $t $t3
cef29ec5
ER
47}
48
ed1ec331
ER
49gen_list() {
50 date
51 /usr/bin/poldek -O "auto directory dependencies = yes" \
68442ebe 52 --ignore "*-debuginfo-*" \
ed1ec331
ER
53 --ignore "opera-plugin32-*" \
54 --ignore "nspluginwrapper-*" \
55 --ignore "mbrola-voice-*" \
63c951e1
JR
56 --ignore "pysql-*" \
57 --ignore "yasql-*" \
ee85662d
JR
58 --ignore "kde4-kdenetwork-kopete-protocol-skype-*.x86_64" \
59 --ignore "libpurple-protocol-skype-*.x86_64" \
36948f3c 60 --ignore "*-video-nvidia-legacy3-*" \
cef29ec5 61 --verify=deps -Q "$@" | filter_deps | group_deps | sort | pkg2src "$@"
ed1ec331
ER
62}
63
64gen_list_uniq() {
fd1600c1 65 gen_list -O"unique package names = yes" "$@"
ed1ec331
ER
66}
67
68t=$(mktemp)
69ftpdir=$HOME/ftp
70gen_list -s $ftpdir/PLD/x86_64/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main.txt
71gen_list_uniq -s $ftpdir/PLD/x86_64/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/x86_64/RPMS/ -s $ftpdir/ready/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready.txt
72gen_list_uniq -s $ftpdir/PLD/x86_64/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/x86_64/RPMS/ -s $ftpdir/ready/noarch/RPMS/ -s $ftpdir/test/x86_64/RPMS/ -s $ftpdir/test/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready-test.txt
73
74gen_list -s $ftpdir/PLD/i686/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main-i686.txt
75gen_list_uniq -s $ftpdir/PLD/i686/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/i686/RPMS/ -s $ftpdir/ready/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready-i686.txt
76gen_list_uniq -s $ftpdir/PLD/i686/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/i686/RPMS/ -s $ftpdir/ready/noarch/RPMS/ -s $ftpdir/test/i686/RPMS/ -s $ftpdir/test/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready-test-i686.txt
77
78gen_list -s $ftpdir/PLD/i486/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main-i486.txt
79gen_list_uniq -s $ftpdir/PLD/i486/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/i486/RPMS/ -s $ftpdir/ready/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready-i486.txt
80gen_list_uniq -s $ftpdir/PLD/i486/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/i486/RPMS/ -s $ftpdir/ready/noarch/RPMS/ -s $ftpdir/test/i486/RPMS/ -s $ftpdir/test/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready-test-i486.txt
81
82(date; $HOME/bin/ac-th-diff.py) > $t && cat $t > $HOME/www/ac-th-diff.txt
83
84chmod 644 $HOME/www/*.txt
85rm -f $t
This page took 0.601731 seconds and 4 git commands to generate.