packages: builder Separately report md5 problems and 0 size file problems.

arekm arekm at pld-linux.org
Mon Dec 14 20:21:06 CET 2009


Author: arekm                        Date: Mon Dec 14 19:21:06 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
Separately report md5 problems and 0 size file problems.

---- Files affected:
packages:
   builder (1.600 -> 1.601) 

---- Diffs:

================================================================
Index: packages/builder
diff -u packages/builder:1.600 packages/builder:1.601
--- packages/builder:1.600	Wed Nov 25 21:37:40 2009
+++ packages/builder	Mon Dec 14 20:21:01 2009
@@ -961,18 +961,27 @@
 }
 
 check_md5() {
+	local bad
 	[ "$NO5" = "yes" ] && return
 
 	update_shell_title "check md5"
 
 	for i in "$@"; do
-		if good_md5 "$i" && good_size "$i"; then
-			continue
+		bad=0
+		if ! good_md5 "$i"; then
+			echo -n "MD5 sum mismatch."
+			bad=1
+		fi
+		if ! good_size "$i"; then
+			echo -n "0 sized file."
+			bad=1
 		fi
 
-		echo "MD5 sum mismatch or 0 size.  Use -U to refetch sources,"
-		echo "or -5 to update md5 sums, if you're sure files are correct."
-		Exit_error err_no_source_in_repo $i
+		if [ $bad -eq 1 ]; then
+			echo " Use -U to refetch sources,"
+			echo "or -5 to update md5 sums, if you're sure files are correct."
+			Exit_error err_no_source_in_repo $i
+		fi
 	done
 }
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/builder?r1=1.600&r2=1.601&f=u



More information about the pld-cvs-commit mailing list