diff options
Diffstat (limited to 'meta/classes/base.bbclass')
| -rw-r--r-- | meta/classes/base.bbclass | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 31457f9f12..a3170d219c 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
| @@ -526,23 +526,21 @@ python () { | |||
| 526 | bad_licenses = expand_wildcard_licenses(d, bad_licenses) | 526 | bad_licenses = expand_wildcard_licenses(d, bad_licenses) |
| 527 | 527 | ||
| 528 | whitelist = [] | 528 | whitelist = [] |
| 529 | incompatwl = [] | ||
| 530 | for lic in bad_licenses: | 529 | for lic in bad_licenses: |
| 531 | spdx_license = return_spdx(d, lic) | 530 | spdx_license = return_spdx(d, lic) |
| 532 | whitelist.extend((d.getVar("WHITELIST_" + lic) or "").split()) | 531 | whitelist.extend((d.getVar("WHITELIST_" + lic) or "").split()) |
| 533 | if spdx_license: | 532 | if spdx_license: |
| 534 | whitelist.extend((d.getVar("WHITELIST_" + spdx_license) or "").split()) | 533 | whitelist.extend((d.getVar("WHITELIST_" + spdx_license) or "").split()) |
| 534 | |||
| 535 | if pn in whitelist: | ||
| 535 | ''' | 536 | ''' |
| 536 | We need to track what we are whitelisting and why. If pn is | 537 | We need to track what we are whitelisting and why. If pn is |
| 537 | incompatible we need to be able to note that the image that | 538 | incompatible we need to be able to note that the image that |
| 538 | is created may infact contain incompatible licenses despite | 539 | is created may infact contain incompatible licenses despite |
| 539 | INCOMPATIBLE_LICENSE being set. | 540 | INCOMPATIBLE_LICENSE being set. |
| 540 | ''' | 541 | ''' |
| 541 | incompatwl.extend((d.getVar("WHITELIST_" + lic) or "").split()) | 542 | bb.note("Including %s as buildable despite it having an incompatible license because it has been whitelisted" % pn) |
| 542 | if spdx_license: | 543 | else: |
| 543 | incompatwl.extend((d.getVar("WHITELIST_" + spdx_license) or "").split()) | ||
| 544 | |||
| 545 | if not pn in whitelist: | ||
| 546 | pkgs = d.getVar('PACKAGES').split() | 544 | pkgs = d.getVar('PACKAGES').split() |
| 547 | skipped_pkgs = [] | 545 | skipped_pkgs = [] |
| 548 | unskipped_pkgs = [] | 546 | unskipped_pkgs = [] |
| @@ -562,9 +560,6 @@ python () { | |||
| 562 | elif all_skipped or incompatible_license(d, bad_licenses): | 560 | elif all_skipped or incompatible_license(d, bad_licenses): |
| 563 | bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, license)) | 561 | bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, license)) |
| 564 | raise bb.parse.SkipRecipe("it has an incompatible license: %s" % license) | 562 | raise bb.parse.SkipRecipe("it has an incompatible license: %s" % license) |
| 565 | elif pn in whitelist: | ||
| 566 | if pn in incompatwl: | ||
| 567 | bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted") | ||
| 568 | 563 | ||
| 569 | # Try to verify per-package (LICENSE_<pkg>) values. LICENSE should be a | 564 | # Try to verify per-package (LICENSE_<pkg>) values. LICENSE should be a |
| 570 | # superset of all per-package licenses. We do not do advanced (pattern) | 565 | # superset of all per-package licenses. We do not do advanced (pattern) |
