]> code.ossystems Code Review - openembedded-core.git/commitdiff
insane.bbclass: Warn if ${COREBASE}/LICENSE is used
authorSaul Wold <sgw@linux.intel.com>
Fri, 1 Sep 2017 21:53:25 +0000 (14:53 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Sep 2017 22:59:55 +0000 (23:59 +0100)
The top level LICENSE file is not actually a license, it refers
other licenses that are used by Bitbake and Meta-data. Relying
on this file could cause problems for recipes when this file
changes, which it is about to.

(From OE-Core rev: a1948ab38c9cb7f0b16cce9dadc03ae6e2fe44ad)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass

index 3906ba797e32914e717a1855ba2eff63ba5de9c8..aa304f108e150712024618189df9f4aee37c31f4 100644 (file)
@@ -589,7 +589,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')
-
+    corebase_licensefile = d.getVar('COREBASE') + "/LICENSE"
     for url in lic_files.split():
         try:
             (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
@@ -601,6 +601,9 @@ python populate_lic_qa_checksum() {
             package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d)
             continue
 
+        if (srclicfile == corebase_licensefile):
+            bb.warn("${COREBASE}/LICENSE is not a valid license file, please use '${COMMON_LICENSE_DIR}/MIT' for a MIT License file in LIC_FILES_CHKSUM. This will become an error in the future")
+
         recipemd5 = parm.get('md5', '')
         beginline, endline = 0, 0
         if 'beginline' in parm: