[oe-commits] Koen Kooi : base.bbclass: only error out on missing checksums when OE_STRICT_CHECKSUMS is set * we want to error out on non-matching sums , missing ones are less bad

GIT User account git at amethyst.openembedded.net
Tue Feb 3 14:50:13 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 72ead1798f650dec45aa4c59fd3f2593a84c7b88
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=72ead1798f650dec45aa4c59fd3f2593a84c7b88

Author: Koen Kooi <koen at openembedded.org>
Date:   Wed Jan 21 20:29:53 2009 +0100

base.bbclass: only error out on missing checksums when OE_STRICT_CHECKSUMS is set * we want to error out on non-matching sums, missing ones are less bad
* People can now set OE_STRICT_CHECKSUMS = "" in local.conf to make a missing checksum a warning, but checksum errors are still fatal, as it should

---

 classes/base.bbclass |    8 +++++++-
 conf/bitbake.conf    |    2 ++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index fca0edd..411adc9 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -71,7 +71,13 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
         
         file.write("[%s]\nmd5=%s\nsha256=%s\n\n" % (src_uri, md5data, shadata))
         file.close()
-        return False
+        if not bb.data.getVar("OE_STRICT_CHECKSUMS",data, True):
+            bb.note("This package has no entry in checksums.ini, please add one")
+            bb.note("\n[%s]\nmd5=%s\nsha256=%s" % (src_uri, md5data, shadata))
+            return True
+        else:
+            bb.note("Missing checksum")
+            return False
 
     if not md5 == md5data:
         bb.note("The MD5Sums did not match. Wanted: '%s' and Got: '%s'" % (md5,md5data))
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 7c9dcee..81d4c93 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -472,6 +472,8 @@ export palmqtdir = "${palmtopdir}"
 # Download locations and utilities.
 ##################################################################
 
+OE_STRICT_CHECKSUMS ?= "1"
+
 GNU_MIRROR = "ftp://ftp.gnu.org/gnu"
 DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
 SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"





More information about the Openembedded-commits mailing list