summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass29
1 files changed, 26 insertions, 3 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index bfc78dba3a..531b0e72c0 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -478,12 +478,30 @@ python () {
478 bad_licenses = expand_wildcard_licenses(d, bad_licenses) 478 bad_licenses = expand_wildcard_licenses(d, bad_licenses)
479 479
480 whitelist = [] 480 whitelist = []
481 incompatwl = []
482 htincompatwl = []
481 for lic in bad_licenses: 483 for lic in bad_licenses:
484 spdx_license = return_spdx(d, lic)
482 for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]: 485 for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]:
483 whitelist.extend((d.getVar(w + lic, True) or "").split()) 486 whitelist.extend((d.getVar(w + lic, True) or "").split())
484 spdx_license = return_spdx(d, lic) 487 if spdx_license:
485 if spdx_license: 488 whitelist.extend((d.getVar(w + spdx_license, True) or "").split())
486 whitelist.extend((d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split()) 489 '''
490 We need to track what we are whitelisting and why. If pn is
491 incompatible and is not HOSTTOOLS_WHITELIST_ we need to be
492 able to note that the image that is created may infact
493 contain incompatible licenses despite INCOMPATIBLE_LICENSE
494 being set.
495 '''
496 if "HOSTTOOLS" in w:
497 htincompatwl.extend((d.getVar(w + lic, True) or "").split())
498 if spdx_license:
499 htincompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
500 else:
501 incompatwl.extend((d.getVar(w + lic, True) or "").split())
502 if spdx_license:
503 incompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
504
487 if not pn in whitelist: 505 if not pn in whitelist:
488 recipe_license = d.getVar('LICENSE', True) 506 recipe_license = d.getVar('LICENSE', True)
489 pkgs = d.getVar('PACKAGES', True).split() 507 pkgs = d.getVar('PACKAGES', True).split()
@@ -504,6 +522,11 @@ python () {
504 elif all_skipped or incompatible_license(d, bad_licenses): 522 elif all_skipped or incompatible_license(d, bad_licenses):
505 bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license)) 523 bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license))
506 raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license) 524 raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license)
525 elif pn in whitelist:
526 if pn in incompatwl:
527 bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted")
528 elif pn in htincompatwl:
529 bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted for HOSTTOOLS")
507 530
508 srcuri = d.getVar('SRC_URI', True) 531 srcuri = d.getVar('SRC_URI', True)
509 # Svn packages should DEPEND on subversion-native 532 # Svn packages should DEPEND on subversion-native