summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2017-09-01 14:53:25 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-02 00:52:10 +0100
commit6e224e9c8e3850ced305b9cd971b093d8a588d5e (patch)
treea020eb5f1a844570c73798b792c9c5c375106026 /meta/classes/insane.bbclass
parent2563e866b34e84e798c89df8cc18c2685b5f51e2 (diff)
downloadpoky-6e224e9c8e3850ced305b9cd971b093d8a588d5e.tar.gz
insane.bbclass: Warn if ${COREBASE}/LICENSE is used
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) (From OE-Core rev: dd75644db2f662f0d88529a068bbfb599c9790a9) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 3906ba797e..aa304f108e 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -589,7 +589,7 @@ python populate_lic_qa_checksum() {
589 sane = package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d) 589 sane = package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
590 590
591 srcdir = d.getVar('S') 591 srcdir = d.getVar('S')
592 592 corebase_licensefile = d.getVar('COREBASE') + "/LICENSE"
593 for url in lic_files.split(): 593 for url in lic_files.split():
594 try: 594 try:
595 (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) 595 (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
@@ -601,6 +601,9 @@ python populate_lic_qa_checksum() {
601 package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d) 601 package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d)
602 continue 602 continue
603 603
604 if (srclicfile == corebase_licensefile):
605 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")
606
604 recipemd5 = parm.get('md5', '') 607 recipemd5 = parm.get('md5', '')
605 beginline, endline = 0, 0 608 beginline, endline = 0, 0
606 if 'beginline' in parm: 609 if 'beginline' in parm: