diff options
author | Andre McCurdy <armccurdy@gmail.com> | 2016-03-31 11:13:07 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-01 07:14:30 +0100 |
commit | 0012b9057fea506fd6bc8a063166550931668e04 (patch) | |
tree | 5f8dd882a3eec453c8adc02ff61a2c728b61e2eb /meta/classes/base.bbclass | |
parent | efe73cb5a74099ba2fab42a84fee9b825dd6adbd (diff) | |
download | poky-0012b9057fea506fd6bc8a063166550931668e04.tar.gz |
base.bbclass: avoid duplicate call to d.getVar('LICENSE', True)
Reuse the 'license' variable, instead of calling
d.getVar('LICENSE', True) again.
(From OE-Core rev: 32a1df86877cd8e70baccd858847fa927508f159)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index ab8715e597..67b33706f4 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -516,7 +516,6 @@ python () { | |||
516 | incompatwl.extend((d.getVar(w + spdx_license, True) or "").split()) | 516 | incompatwl.extend((d.getVar(w + spdx_license, True) or "").split()) |
517 | 517 | ||
518 | if not pn in whitelist: | 518 | if not pn in whitelist: |
519 | recipe_license = d.getVar('LICENSE', True) | ||
520 | pkgs = d.getVar('PACKAGES', True).split() | 519 | pkgs = d.getVar('PACKAGES', True).split() |
521 | skipped_pkgs = [] | 520 | skipped_pkgs = [] |
522 | unskipped_pkgs = [] | 521 | unskipped_pkgs = [] |
@@ -528,14 +527,14 @@ python () { | |||
528 | all_skipped = skipped_pkgs and not unskipped_pkgs | 527 | all_skipped = skipped_pkgs and not unskipped_pkgs |
529 | if unskipped_pkgs: | 528 | if unskipped_pkgs: |
530 | for pkg in skipped_pkgs: | 529 | for pkg in skipped_pkgs: |
531 | bb.debug(1, "SKIPPING the package " + pkg + " at do_rootfs because it's " + recipe_license) | 530 | bb.debug(1, "SKIPPING the package " + pkg + " at do_rootfs because it's " + license) |
532 | mlprefix = d.getVar('MLPREFIX', True) | 531 | mlprefix = d.getVar('MLPREFIX', True) |
533 | d.setVar('LICENSE_EXCLUSION-' + mlprefix + pkg, 1) | 532 | d.setVar('LICENSE_EXCLUSION-' + mlprefix + pkg, 1) |
534 | for pkg in unskipped_pkgs: | 533 | for pkg in unskipped_pkgs: |
535 | bb.debug(1, "INCLUDING the package " + pkg) | 534 | bb.debug(1, "INCLUDING the package " + pkg) |
536 | elif all_skipped or incompatible_license(d, bad_licenses): | 535 | elif all_skipped or incompatible_license(d, bad_licenses): |
537 | bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license)) | 536 | bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, license)) |
538 | raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license) | 537 | raise bb.parse.SkipPackage("incompatible with license %s" % license) |
539 | elif pn in whitelist: | 538 | elif pn in whitelist: |
540 | if pn in incompatwl: | 539 | if pn in incompatwl: |
541 | bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted") | 540 | bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted") |