]>
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 | 68 | --ignore "*-debuginfo-*" \ |
ed1ec331 ER |
69 | --ignore "opera-plugin32-*" \ |
70 | --ignore "nspluginwrapper-*" \ | |
71 | --ignore "mbrola-voice-*" \ | |
cef29ec5 | 72 | --verify=deps -Q "$@" | filter_deps | group_deps | sort | pkg2src "$@" |
ed1ec331 ER |
73 | } |
74 | ||
75 | gen_list_uniq() { | |
fd1600c1 | 76 | gen_list -O"unique package names = yes" "$@" |
ed1ec331 ER |
77 | } |
78 | ||
79 | t=$(mktemp) | |
80 | ftpdir=$HOME/ftp | |
81 | gen_list -s $ftpdir/PLD/x86_64/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main.txt | |
82 | 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 | |
83 | 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 | |
84 | ||
85 | gen_list -s $ftpdir/PLD/i686/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main-i686.txt | |
86 | 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 | |
87 | 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 | |
88 | ||
89 | gen_list -s $ftpdir/PLD/i486/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main-i486.txt | |
90 | 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 | |
91 | 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 | |
92 | ||
93 | (date; $HOME/bin/ac-th-diff.py) > $t && cat $t > $HOME/www/ac-th-diff.txt | |
94 | ||
95 | chmod 644 $HOME/www/*.txt | |
96 | rm -f $t |