]> TLD Linux GIT Repositories - tld-ftp-admin.git/blobdiff - wwwbin/consistency-check.sh
- tldized
[tld-ftp-admin.git] / wwwbin / consistency-check.sh
diff --git a/wwwbin/consistency-check.sh b/wwwbin/consistency-check.sh
deleted file mode 100755 (executable)
index 25ed2c3..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/sh
-
-export LC_ALL=C
-
-filter_deps() {
-       if [ $1 = "x32" ]; then
-         grep -Ev "(uname\(release\)|-multilib-|\/eclipse\/|statifier|kernel-nopae-source-|kernel-tools-perf-vdso|libreoffice|iceape|iceweasel|icedove|nodejs)"
-       else
-         grep -Ev "(uname\(release\)|-multilib-|\/eclipse\/|statifier|kernel-nopae-source-|kernel-tools-perf-vdso)"
-    fi
-}
-
-# group errors by same error kind
-group_deps() {
-       local t=$(mktemp)
-       cat > $t
-       sed -ne 's/.*req \(.*\) not found.*/\1/p' $t | sort -u | while read dep; do
-               grep -F "req $dep not found" $t
-       done
-       rm -f $t
-}
-
-# convert pkg name to src.rpm name
-# uses poldek
-pkg2src() {
-       local t=$(mktemp)
-       local t3=$(mktemp)
-
-       # save input
-       cat > $t
-
-       # create list of N-V-R.A.rpm -> src-N pairs from error report
-       # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found
-       sed -ne 's/error: \(.*\): req .* not found/\1/p' $t | sort -u | \
-               xargs -d '\n' poldek --noignore -Q "$@" --cmd ls -q -s | \
-               sed -rne "s/^([^\t ]+)[\t ]+(.+)-[^-]+-[^-]+\.src\.rpm$/\1\t\2/p" >$t3
-
-       local pkg error message srpm
-       while read error pkg message; do
-               # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found
-               srpm=$(awk -vpkg="${pkg%:}" '$1 == pkg {printf("%s.spec", $2)}' $t3)
-               if [ -z "$srpm" ]; then
-                       echo >&2 "srpms: No match for [${pkg%:}]"
-               fi
-               echo "$error [$srpm] $pkg $message"
-       done < $t
-
-       rm -f $t $t3
-}
-
-gen_list() {
-       arch=$1
-       shift
-       date
-       poldek -O "auto directory dependencies = yes" \
-       --ignore "*-debuginfo-*" \
-       --ignore "opera-plugin32-*" \
-       --ignore "nspluginwrapper-*" \
-       --ignore "mbrola-voice-*" \
-       --ignore "pysql-*" \
-       --ignore "yasql-*" \
-       --ignore "kde4-kdenetwork-kopete-protocol-skype-*.x86_64" \
-       --ignore "libpurple-protocol-skype-*.x86_64" \
-       --ignore "nagios-plugin-check_cciss-*" \
-       --ignore "libpng1*" \
-       --verify=deps -Q "$@" | filter_deps $arch | group_deps | pkg2src "$@" | sort
-}
-
-gen_list_uniq() {
-       arch=$1
-       shift
-       gen_list $arch -O"unique package names = yes" "$@"
-}
-
-t=$(mktemp)
-ftpdir=$HOME/ftp
-for arch in x86_64 i686 x32 ; do
-       if [ "$arch" = x86_64 ]; then
-               outfext=.txt
-       else
-               outfext=-$arch.txt
-       fi
-       gen_list      $arch -s $ftpdir/PLD/$arch/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t && cat $t > $HOME/www/main$outfext
-       gen_list_uniq $arch -s $ftpdir/PLD/$arch/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/$arch/RPMS/ -s $ftpdir/ready/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready$outfext
-       gen_list_uniq $arch -s $ftpdir/PLD/$arch/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ -s $ftpdir/ready/$arch/RPMS/ -s $ftpdir/ready/noarch/RPMS/ -s $ftpdir/test/$arch/RPMS/ -s $ftpdir/test/noarch/RPMS/ > $t && cat $t > $HOME/www/main-ready-test$outfext
-done
-
-chmod 644 $HOME/www/*.txt
-rm -f $t