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>
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:
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'])
(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