diff options
author | Sergei Miroshnichenko <sergeimir@emcraft.com> | 2016-10-18 13:06:57 +0300 |
---|---|---|
committer | Sergei Miroshnichenko <sergeimir@emcraft.com> | 2016-10-18 13:09:10 +0300 |
commit | 70be4ca7dbf5049c4a5450f7eebbd0c57a548702 (patch) | |
tree | 7e123b73a28f1621be246bd644be9f8a9f4c79cd | |
parent | 327e4bf5a84d5b49ccc65927df622c9ef6302d55 (diff) | |
download | openembedded-core-contrib-70be4ca7dbf5049c4a5450f7eebbd0c57a548702.tar.gz |
license: Don't validate checksums for COMMON_LICENSE_DIR
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>
-rw-r--r-- | meta/classes/insane.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/license.bbclass | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 1d73778255..6868cc77f8 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -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']) diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index da4fc3e1d4..2de3113557 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass @@ -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 |