]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
license: Don't validate checksums for COMMON_LICENSE_DIR
authorSergei Miroshnichenko <sergeimir@emcraft.com>
Tue, 18 Oct 2016 10:06:57 +0000 (13:06 +0300)
committerSergei Miroshnichenko <sergeimir@emcraft.com>
Tue, 18 Oct 2016 10:09:10 +0000 (13:09 +0300)
If LIC_FILES_CHKSUM points to the generic license file through
COMMON_LICENSE_DIR (or, equivalently, ${COREBASE}/meta/files/common-licenses/)
instead of embedding it into the package, there should be no
checksums validation.

Signed-off-by: Sergei Miroshnichenko <sergeimir@emcraft.com>
meta/classes/insane.bbclass
meta/classes/license.bbclass

index 1d73778255a6227c31ba599db291977bc18a95e3..6868cc77f8c673725551255d49cb323d1b372a58 100644 (file)
@@ -714,6 +714,7 @@ python populate_lic_qa_checksum() {
         sane = package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
 
     srcdir = d.getVar('S', True)
+    generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
 
     for url in lic_files.split():
         try:
@@ -727,6 +728,9 @@ python populate_lic_qa_checksum() {
             continue
 
         recipemd5 = parm.get('md5', '')
+        if os.path.dirname(path) == generic_directory:
+            continue
+
         beginline, endline = 0, 0
         if 'beginline' in parm:
             beginline = int(parm['beginline'])
index da4fc3e1d4c72ae7732a0478f8a09cb08e13abef..2de3113557fe200eac07f22c74ca7e25021c2f12 100644 (file)
@@ -478,6 +478,10 @@ def find_license_files(d):
             (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
         except bb.fetch.MalformedUrl:
             bb.fatal("%s: LIC_FILES_CHKSUM contains an invalid URL:  %s" % (d.getVar('PF', True), url))
+
+        if os.path.dirname(path) == generic_directory:
+            lic_chksums[path] = 'none'
+            continue;
         # We want the license filename and path
         chksum = parm['md5'] if 'md5' in parm else parm['sha256']
         lic_chksums[path] = chksum