pld-ftp-admin: wwwbin/consistency-check.sh - report for missing matches

glen glen at pld-linux.org
Mon Aug 6 17:37:41 CEST 2012


Author: glen                         Date: Mon Aug  6 15:37:40 2012 GMT
Module: pld-ftp-admin                 Tag: HEAD
---- Log message:
- report for missing matches

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

---- Diffs:

================================================================
Index: pld-ftp-admin/wwwbin/consistency-check.sh
diff -u pld-ftp-admin/wwwbin/consistency-check.sh:1.6 pld-ftp-admin/wwwbin/consistency-check.sh:1.7
--- pld-ftp-admin/wwwbin/consistency-check.sh:1.6	Mon Aug  6 17:35:11 2012
+++ pld-ftp-admin/wwwbin/consistency-check.sh	Mon Aug  6 17:37:35 2012
@@ -37,16 +37,23 @@
 	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
 		# 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
+		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
 
================================================================

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



More information about the pld-cvs-commit mailing list