1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-15 15:37:03 +00:00

classes-global/license: Move functions to library code

Moves several of the functions in license.bbclass to be library code

New function dependencies were manually verified using bitbake-dumpsigs
to ensure that bitbake identified the same dependencies even though they
are now in library code (although the new function names mean that the
task hashes still change)

(From OE-Core rev: 5e220e20833fd800687b05c8f5cef602dfc47202)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0333e04e353991260c5f67a72f80f3ab9dcf526a)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Joshua Watt
2025-11-07 14:14:37 +01:00
committed by Steve Sakoman
parent b16bf27386
commit ff75417547
4 changed files with 175 additions and 177 deletions
+5 -5
View File
@@ -520,8 +520,8 @@ python () {
bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
if bb.data.inherits_class('license', d):
check_license_format(d)
unmatched_license_flags = check_license_flags(d)
oe.license.check_license_format(d)
unmatched_license_flags = oe.license.check_license_flags(d)
if unmatched_license_flags:
for unmatched in unmatched_license_flags:
message = "Has a restricted license '%s' which is not listed in your LICENSE_FLAGS_ACCEPTED." % unmatched
@@ -575,7 +575,7 @@ python () {
check_license = False
if check_license and bad_licenses:
bad_licenses = expand_wildcard_licenses(d, bad_licenses)
bad_licenses = oe.license.expand_wildcard_licenses(d, bad_licenses)
exceptions = (d.getVar("INCOMPATIBLE_LICENSE_EXCEPTIONS") or "").split()
@@ -591,7 +591,7 @@ python () {
for pkg in pkgs:
remaining_bad_licenses = oe.license.apply_pkg_license_exception(pkg, bad_licenses, exceptions)
incompatible_lic = incompatible_license(d, remaining_bad_licenses, pkg)
incompatible_lic = oe.license.incompatible_license(d, remaining_bad_licenses, pkg)
if incompatible_lic:
skipped_pkgs[pkg] = incompatible_lic
else:
@@ -604,7 +604,7 @@ python () {
for pkg in unskipped_pkgs:
bb.debug(1, "Including the package %s" % pkg)
else:
incompatible_lic = incompatible_license(d, bad_licenses)
incompatible_lic = oe.license.incompatible_license(d, bad_licenses)
for pkg in skipped_pkgs:
incompatible_lic += skipped_pkgs[pkg]
incompatible_lic = sorted(list(set(incompatible_lic)))