mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
base.bbclass: Report only the licenses that are incompatible for a package
Instead of reporting ${LICENSE} when a package is identified as using
an incompatible license, report the license(s) that are actually
incompatible.
(From OE-Core rev: fb3405fac7b933a3f9d23e5faf6a3cf2d1990982)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4028227713
commit
5560c50316
@@ -4,7 +4,7 @@ from oeqa.utils.commands import bitbake
|
||||
class IncompatibleLicenseTests(OESelftestTestCase):
|
||||
|
||||
def lic_test(self, pn, pn_lic, lic):
|
||||
error_msg = 'ERROR: Nothing PROVIDES \'%s\'\n%s was skipped: it has an incompatible license: %s' % (pn, pn, pn_lic)
|
||||
error_msg = 'ERROR: Nothing PROVIDES \'%s\'\n%s was skipped: it has incompatible license(s): %s' % (pn, pn, pn_lic)
|
||||
|
||||
self.write_config("INCOMPATIBLE_LICENSE += \"%s\"" % (lic))
|
||||
|
||||
@@ -27,12 +27,12 @@ class IncompatibleLicenseTests(OESelftestTestCase):
|
||||
# license cannot be built when INCOMPATIBLE_LICENSE contains this SPDX
|
||||
# license
|
||||
def test_incompatible_spdx_license_alias(self):
|
||||
self.lic_test('incompatible-license-alias', 'GPLv3', 'GPL-3.0')
|
||||
self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPL-3.0')
|
||||
|
||||
# Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX
|
||||
# license cannot be built when INCOMPATIBLE_LICENSE contains this alias
|
||||
def test_incompatible_alias_spdx_license_alias(self):
|
||||
self.lic_test('incompatible-license-alias', 'GPLv3', 'GPLv3')
|
||||
self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPLv3')
|
||||
|
||||
# Verify that a package with a non-SPDX license (neither in
|
||||
# AVAILABLE_LICENSES nor in SPDXLICENSEMAP) cannot be built when
|
||||
|
||||
Reference in New Issue
Block a user