diff options
author | Quentin Schulz <quentin.schulz@streamunlimited.com> | 2020-04-20 22:13:29 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-21 10:52:07 +0100 |
commit | fa7b29e22bf9b92c4bb0cf5e884b25e4ae223c0d (patch) | |
tree | dd5036d27a98bd13c753fd44c4ba4d79046e7fa8 /meta/classes/base.bbclass | |
parent | 6cb7107d862a086eb209b2ac41249ea73e3d9c56 (diff) | |
download | poky-fa7b29e22bf9b92c4bb0cf5e884b25e4ae223c0d.tar.gz |
base/insane: Check pkgs lics are subset of recipe lics only once
Move logic checking that all packages licenses are only a subset of
recipe licenses from base.bbclass to the insane.bbclass so that it's
evaluated only once, during do_package_qa.
As explained in the linked bugzilla entry, if a package license is not
part of the recipe license, the warning message gets shown an
unreasonable amount of time because it's evaluated every time a recipe
is parsed.
[YOCTO #10130]
This also makes it possible to silence this error with INSANE_SKIP.
(From OE-Core rev: 852408ed4be1f64c57e196688728b7ed223d3493)
Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 45f9435fd8..7aa2e144eb 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -584,19 +584,6 @@ python () { | |||
584 | bb.debug(1, "Skipping recipe %s because of incompatible license(s): %s" % (pn, ' '.join(incompatible_lic))) | 584 | bb.debug(1, "Skipping recipe %s because of incompatible license(s): %s" % (pn, ' '.join(incompatible_lic))) |
585 | raise bb.parse.SkipRecipe("it has incompatible license(s): %s" % ' '.join(incompatible_lic)) | 585 | raise bb.parse.SkipRecipe("it has incompatible license(s): %s" % ' '.join(incompatible_lic)) |
586 | 586 | ||
587 | # Try to verify per-package (LICENSE_<pkg>) values. LICENSE should be a | ||
588 | # superset of all per-package licenses. We do not do advanced (pattern) | ||
589 | # matching of license expressions - just check that all license strings | ||
590 | # in LICENSE_<pkg> are found in LICENSE. | ||
591 | license_set = oe.license.list_licenses(license) | ||
592 | for pkg in d.getVar('PACKAGES').split(): | ||
593 | pkg_license = d.getVar('LICENSE_' + pkg) | ||
594 | if pkg_license: | ||
595 | unlisted = oe.license.list_licenses(pkg_license) - license_set | ||
596 | if unlisted: | ||
597 | bb.warn("LICENSE_%s includes licenses (%s) that are not " | ||
598 | "listed in LICENSE" % (pkg, ' '.join(unlisted))) | ||
599 | |||
600 | needsrcrev = False | 587 | needsrcrev = False |
601 | srcuri = d.getVar('SRC_URI') | 588 | srcuri = d.getVar('SRC_URI') |
602 | for uri in srcuri.split(): | 589 | for uri in srcuri.split(): |