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 ff8c63394f..714a895f68 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -434,12 +434,30 @@ python () { | |||
434 | bad_licenses = map(lambda l: canonical_license(d, l), bad_licenses) | 434 | bad_licenses = map(lambda l: canonical_license(d, l), bad_licenses) |
435 | 435 | ||
436 | whitelist = [] | 436 | whitelist = [] |
437 | incompatwl = [] | ||
438 | htincompatwl = [] | ||
437 | for lic in bad_licenses: | 439 | for lic in bad_licenses: |
440 | spdx_license = return_spdx(d, lic) | ||
438 | for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]: | 441 | for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]: |
439 | whitelist.extend((d.getVar(w + lic, True) or "").split()) | 442 | whitelist.extend((d.getVar(w + lic, True) or "").split()) |
440 | spdx_license = return_spdx(d, lic) | 443 | if spdx_license: |
441 | if spdx_license: | 444 | whitelist.extend((d.getVar(w + spdx_license, True) or "").split()) |
442 | whitelist.extend((d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split()) | 445 | ''' |
446 | We need to track what we are whitelisting and why. If pn is | ||
447 | incompatible and is not HOSTTOOLS_WHITELIST_ we need to be | ||
448 | able to note that the image that is created may infact | ||
449 | contain incompatible licenses despite INCOMPATIBLE_LICENSE | ||
450 | being set. | ||
451 | ''' | ||
452 | if "HOSTTOOLS" in w: | ||
453 | htincompatwl.extend((d.getVar(w + lic, True) or "").split()) | ||
454 | if spdx_license: | ||
455 | htincompatwl.extend((d.getVar(w + spdx_license, True) or "").split()) | ||
456 | else: | ||
457 | incompatwl.extend((d.getVar(w + lic, True) or "").split()) | ||
458 | if spdx_license: | ||
459 | incompatwl.extend((d.getVar(w + spdx_license, True) or "").split()) | ||
460 | |||
443 | if not pn in whitelist: | 461 | if not pn in whitelist: |
444 | recipe_license = d.getVar('LICENSE', True) | 462 | recipe_license = d.getVar('LICENSE', True) |
445 | pkgs = d.getVar('PACKAGES', True).split() | 463 | pkgs = d.getVar('PACKAGES', True).split() |
@@ -460,6 +478,11 @@ python () { | |||
460 | elif all_skipped or incompatible_license(d, bad_licenses): | 478 | elif all_skipped or incompatible_license(d, bad_licenses): |
461 | bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license)) | 479 | bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license)) |
462 | raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license) | 480 | raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license) |
481 | elif pn in whitelist: | ||
482 | if pn in incompatwl: | ||
483 | bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted") | ||
484 | elif pn in htincompatwl: | ||
485 | bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted for HOSTTOOLS") | ||
463 | 486 | ||
464 | srcuri = d.getVar('SRC_URI', True) | 487 | srcuri = d.getVar('SRC_URI', True) |
465 | # Svn packages should DEPEND on subversion-native | 488 | # Svn packages should DEPEND on subversion-native |