]>
Commit | Line | Data |
---|---|---|
ed1ec331 ER |
1 | #!/bin/sh |
2 | ||
3 | export LC_ALL=C | |
4 | ||
5 | filter_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 |
12 | group_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 |
23 | pkg2src() { |
24 | local t=$(mktemp) | |
25 | local t1=$(mktemp) | |
26 | local t2=$(mktemp) | |
27 | local t3=$(mktemp) | |
28 | ||
29 | # save input | |
30 | cat > $t | |
31 | ||
85a9e847 | 32 | # create list of packages from error report |
cef29ec5 | 33 | # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found |
85a9e847 | 34 | sed -ne 's/error: \(.*\): req .* not found/\1/p' $t | sort -u > $t1 |
cef29ec5 | 35 | |
85a9e847 ER |
36 | # create list of package -> src.rpm names |
37 | poldek --noignore -Q "$@" --cmd ls -q -s > $t2 | |
cef29ec5 ER |
38 | |
39 | # create N-V-R -> N list | |
789fadf6 | 40 | local pkg error message srpm out |
cef29ec5 | 41 | while read pkg; do |
e9286868 ER |
42 | pkg=$(echo "$pkg" | sed -e 's,+,\\+,g') |
43 | ||
85a9e847 ER |
44 | # there's no space between the columns, so need to match with known archs |
45 | # see https://bugs.launchpad.net/poldek/+bug/1031767 | |
789fadf6 ER |
46 | out=$(sed -rne "s/^($pkg)\.(x86_64|i686|noarch)(.+)-[^-]+-[^-]+\.src\.rpm$/\1\t\3/p" $t2) |
47 | if [ -z "$out" ]; then | |
48 | echo >&2 "nvr: No match for [$pkg]" | |
49 | fi | |
50 | echo "$out" | |
cef29ec5 ER |
51 | done < $t1 > $t3 |
52 | ||
53 | while read error pkg message; do | |
54 | # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found | |
55 | srpm=$(awk -vpkg="${pkg%:}" '$1 == pkg {printf("%s.spec", $2)}' $t3) | |
789fadf6 ER |
56 | if [ -z "$srpm" ]; then |
57 | echo >&2 "srpms: No match for [${pkg%:}]" | |
58 | fi | |
cef29ec5 ER |
59 | echo "$error [$srpm] $pkg $message" |
60 | done < $t | |
61 | ||
62 | rm -f $t $t1 $t2 $t3 | |
63 | } | |
64 | ||
ed1ec331 ER |
65 | gen_list() { |
66 | date | |
67 | /usr/bin/poldek -O "auto directory dependencies = yes" \ | |
68442ebe JR |
68 | --ignore "*-debuginfo-*" \ |
69 | --ignore "db4.6*" \ | |
ed1ec331 ER |
70 | --ignore "boost*1.34*" \ |
71 | --ignore "krb5*" \ | |
72 | --ignore "libjpeg6*" \ | |
73 | --ignore "libpthread-stubs-devel*" \ | |
74 | --ignore "monodoc-*" \ | |
68442ebe JR |
75 | --ignore "arts-*" \ |
76 | --ignore "artsc-*" \ | |
ed1ec331 ER |
77 | --ignore "esound-*" \ |
78 | --ignore "opera-plugin32-*" \ | |
79 | --ignore "nspluginwrapper-*" \ | |
80 | --ignore "mbrola-voice-*" \ | |
fd1600c1 | 81 | --ignore "hal" \ |
ed1ec331 ER |
82 | --ignore "hal-libs" \ |
83 | --ignore "quicktime4linux*" \ | |
608a0844 | 84 | --ignore "compat-libstdc++-*" \ |
cef29ec5 | 85 | --verify=deps -Q "$@" | filter_deps | group_deps | sort | pkg2src "$@" |
ed1ec331 ER |
86 | } |
87 | ||
88 | gen_list_uniq() { | |
fd1600c1 | 89 | gen_list -O"unique package names = yes" "$@" |
ed1ec331 ER |
90 | } |
91 | ||
92 | t=$(mktemp) | |
93 | ftpdir=$HOME/ftp | |
94 | gen_list -s $ftpdir/PLD/x86_64/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main.txt | |
95 | gen_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 | |
96 | gen_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 | |
97 | ||
98 | gen_list -s $ftpdir/PLD/i686/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main-i686.txt | |
99 | gen_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 | |
100 | gen_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 | |
101 | ||
102 | gen_list -s $ftpdir/PLD/i486/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main-i486.txt | |
103 | gen_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 | |
104 | gen_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 | |
105 | ||
106 | (date; $HOME/bin/ac-th-diff.py) > $t && cat $t > $HOME/www/ac-th-diff.txt | |
107 | ||
108 | chmod 644 $HOME/www/*.txt | |
109 | rm -f $t |