]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - wwwbin/consistency-check.sh
- ignore old video-nvidia-legacy3 driver
[projects/pld-ftp-admin.git] / wwwbin / consistency-check.sh
index 713cf1ef8e0a75823a3695d92b68ab891795e1fd..967762d439d65b66d25d8eb817bf33c54be158ec 100644 (file)
@@ -20,9 +20,6 @@ group_deps() {
 
 # convert pkg name to src.rpm name
 # uses poldek
-# TODO: simplify when these bugs get a solution:
-# https://bugs.launchpad.net/poldek/+bug/1031762
-# https://bugs.launchpad.net/poldek/+bug/1031767
 pkg2src() {
        local t=$(mktemp)
        local t1=$(mktemp)
@@ -32,27 +29,33 @@ pkg2src() {
        # save input
        cat > $t
 
+       # create list of packages from error report
        # error: arcconf-7.0.18786-1: req libstdc++.so.5()(64bit) not found
-       # need to include arch as '*', due this bug: https://bugs.launchpad.net/poldek/+bug/1031762
-       sed -ne 's/error: \(.*\): req .* not found/\1\.\*/p' $t | sort -u > $t1
+       sed -ne 's/error: \(.*\): req .* not found/\1/p' $t | sort -u > $t1
 
-       # poldek:/all-avail> ls -s arcconf-7.0.18786-1.*
-       # arcconf-7.0.18786-1.x86_64     arcconf-7.0.18786-1.src.rpm
-       #poldek --cmd < $t > $t2
-       # poldek is an ass, it doesn't allow stdout to be redirected: "error: not a tty"
-       # hack around with xargs submitting input to 'ls' command
-       # https://bugs.launchpad.net/poldek/+bug/1031767
-       xargs --delimiter='\n' --arg-file=$t1 -- /usr/bin/poldek --noignore -Q "$@" --cmd ls -q -s >$t2
+       # create list of package -> src.rpm names
+       poldek --noignore -Q "$@" --cmd ls -q -s > $t2
 
        # create N-V-R -> N list
-       local pkg error message srpm
+       local pkg error message srpm out
        while read pkg; do
-               sed -rne "s/^($pkg)\.(x86_64|i686|noarch)(.+)-[^-]+-[^-]+\.src\.rpm$/\1\t\3/p" $t2
+               pkg=$(echo "$pkg" | sed -e 's,+,\\+,g')
+
+               # there's no space between the columns, so need to match with known archs
+               # see https://bugs.launchpad.net/poldek/+bug/1031767
+               out=$(sed -rne "s/^($pkg)\.(x86_64|i686|noarch)(.+)-[^-]+-[^-]+\.src\.rpm$/\1\t\3/p" $t2)
+               if [ -z "$out" ]; then
+                       echo >&2 "nvr: No match for [$pkg]"
+               fi
+               echo "$out"
        done < $t1 > $t3
 
        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
 
@@ -62,21 +65,16 @@ pkg2src() {
 gen_list() {
        date
        /usr/bin/poldek -O "auto directory dependencies = yes" \
-       --ignore "*-debuginfo-*" --ignore "db4.6*" \
-       --ignore "boost*1.34*" \
-       --ignore "krb5*" \
-       --ignore "libjpeg6*" \
-       --ignore "libpthread-stubs-devel*" \
-       --ignore "monodoc-*" \
-       --ignore "arts-*" --ignore "artsc-*" \
-       --ignore "esound-*" \
+       --ignore "*-debuginfo-*" \
        --ignore "opera-plugin32-*" \
        --ignore "nspluginwrapper-*" \
        --ignore "mbrola-voice-*" \
-       --ignore "hal" \
-       --ignore "hal-libs" \
-       --ignore "quicktime4linux*" \
-       --ignore "compat-libstdc++-*" \
+       --ignore "pysql-*" \
+       --ignore "yasql-*" \
+       --ignore "kde4-kdenetwork-kopete-protocol-skype-*.x86_64" \
+       --ignore "libpurple-protocol-skype-*.x86_64" \
+       --ignore "skype-tools-*.x86_64" \
+       --ignore "*-video-nvidia-legacy3-*" \
        --verify=deps -Q "$@" | filter_deps | group_deps | sort | pkg2src "$@"
 }
 
This page took 0.072539 seconds and 4 git commands to generate.