Author: glen                         Date: Mon Aug  6 15:35:16 2012 GMT
Module: pld-ftp-admin                 Tag: HEAD
---- Log message:
seems this way of invoking poldek does not need tty hacks at all, but bug still 
relevant

---- Files affected:
pld-ftp-admin/wwwbin:
   consistency-check.sh (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: pld-ftp-admin/wwwbin/consistency-check.sh
diff -u pld-ftp-admin/wwwbin/consistency-check.sh:1.5 
pld-ftp-admin/wwwbin/consistency-check.sh:1.6
--- pld-ftp-admin/wwwbin/consistency-check.sh:1.5       Mon Aug  6 14:49:25 2012
+++ pld-ftp-admin/wwwbin/consistency-check.sh   Mon Aug  6 17:35:11 2012
@@ -20,9 +20,6 @@
 
 # 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,21 +29,18 @@
        # 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
        while read pkg; do
+               # there's no space between the columns, so need to match with 
known archs
+               # see https://bugs.launchpad.net/poldek/+bug/1031767
                sed -rne 
"s/^($pkg)\.(x86_64|i686|noarch)(.+)-[^-]+-[^-]+\.src\.rpm$/\1\t\3/p" $t2
        done < $t1 > $t3
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/pld-ftp-admin/wwwbin/consistency-check.sh?r1=1.5&r2=1.6

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to