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