diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2024-10-24 13:03:09 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-25 15:37:10 +0100 |
commit | 3cabb0e17082c0d2ee984d646d0951f9200b8e9c (patch) | |
tree | 57ceadd1a283683a8d473919f614bf2c6fef1c15 /meta/lib/oe/package.py | |
parent | f8f7e53641955f6fc70dcb1d30777fc82060eb24 (diff) | |
download | poky-3cabb0e17082c0d2ee984d646d0951f9200b8e9c.tar.gz |
lib/package: Check incompatible licenses at packaging time
Instead of checking for incompatible licenses in the anonymous python
and setting '_exclude_incompatible-', (re)check all the packages in
populate_packages(). This ensures that all packages are processed, even
dynamically generated ones.
The use of the '_exclude-incompatible-' variable set in base.bbclass has
been the mechanism used for per-packages licenses since it was added as
a feature (although with different names for the variable throughout
history). However, since this misses dynamic packages, calling
oe.license.skip_incompatible_package_licenses() a second time on the
actual final package set is a better solution.
(From OE-Core rev: 1816c5a5e724a7f907c9afe4a47b6699ea081ace)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package.py')
-rw-r--r-- | meta/lib/oe/package.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index c213a9a3ca..104b880b9e 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py | |||
@@ -1447,10 +1447,10 @@ def populate_packages(d): | |||
1447 | 1447 | ||
1448 | # Handle excluding packages with incompatible licenses | 1448 | # Handle excluding packages with incompatible licenses |
1449 | package_list = [] | 1449 | package_list = [] |
1450 | skipped_pkgs = oe.license.skip_incompatible_package_licenses(d, packages) | ||
1450 | for pkg in packages: | 1451 | for pkg in packages: |
1451 | licenses = d.getVar('_exclude_incompatible-' + pkg) | 1452 | if pkg in skipped_pkgs: |
1452 | if licenses: | 1453 | msg = "Excluding %s from packaging as it has incompatible license(s): %s" % (pkg, skipped_pkgs[pkg]) |
1453 | msg = "Excluding %s from packaging as it has incompatible license(s): %s" % (pkg, licenses) | ||
1454 | oe.qa.handle_error("incompatible-license", msg, d) | 1454 | oe.qa.handle_error("incompatible-license", msg, d) |
1455 | else: | 1455 | else: |
1456 | package_list.append(pkg) | 1456 | package_list.append(pkg) |