[oe-commits] org.oe.dev source-checker: move bad news to end of program (list of errors when program end)

hrw commit openembedded-commits at lists.openembedded.org
Thu Oct 18 16:36:33 UTC 2007


source-checker: move bad news to end of program (list of errors when program end)

Author: hrw at openembedded.org
Branch: org.openembedded.dev
Revision: 972c9f9cca55c59beab0adfd32591f9d00ecfefb
ViewMTN: http://monotone.openembedded.org/revision/info/972c9f9cca55c59beab0adfd32591f9d00ecfefb
Files:
1
contrib/source-checker/oe-source-checker.py
Diffs:

#
# mt diff -r5b0629623adb33a44bd86d1522665dfeb7647103 -r972c9f9cca55c59beab0adfd32591f9d00ecfefb
#
# 
# 
# patch "contrib/source-checker/oe-source-checker.py"
#  from [040be52b885ada3edd5f86a0a2221133340d40ba]
#    to [1939cbdc301bfd4c929a2c51dd8f669ff73f6b98]
# 
============================================================
--- contrib/source-checker/oe-source-checker.py	040be52b885ada3edd5f86a0a2221133340d40ba
+++ contrib/source-checker/oe-source-checker.py	1939cbdc301bfd4c929a2c51dd8f669ff73f6b98
@@ -58,7 +58,7 @@ files_good    = 0
 files_total   = len(checksums_parser.sections())
 files_checked = 0
 files_good    = 0
-files_wrong   = 0
+files_wrong   = []
 
 for source in checksums_parser.sections():
     archive = source.split("/")[-1]
@@ -86,7 +86,6 @@ for source in checksums_parser.sections(
 
         if md5 != md5data:
             file_ok = False
-            print "\n%s has wrong md5: %s instead of %s url: %s" % (archive, md5data, md5, source) 
 
         shapipe = os.popen("oe_sha256sum " + localpath)
         shadata = (shapipe.readline().split() or [ "" ])[0]
@@ -94,13 +93,21 @@ for source in checksums_parser.sections(
 
         if shadata != "" and sha != shadata:
             file_ok = False
-            print "\n%s has wrong sha: %s instead of %s url: %s" % (archive, shadata, sha, source) 
 
         if file_ok:
             files_good += 1
         else:
-            files_wrong += 1
+            files_wrong += [ [md5, md5data, sha, shadata, archive, source] ]
     except:
         pass
 
+print "\nChecked %d files. %d was OK and %d had wrong checksums." % (files_checked, files_good, len(files_wrong))
+
+if len(files_wrong) > 0:
+
+    print "\n"
+
+    for wrong_file in files_wrong:
+        print "%s [%s] is wrong" % ( wrong_file[4], wrong_file[5])
+        print "md5: %s instead of %s" % (wrong_file[1], wrong_file[0])
+        print "sha: %s instead of %s" % (wrong_file[3], wrong_file[2])
-print "\nChecked %d files. %d was OK and %d had wrong checksums." % (files_checked, files_good, files_wrong)






More information about the Openembedded-commits mailing list