diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/license_image.bbclass | 5 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/incompatible_lic.py | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass index b5399b6d96..a8c72da3cb 100644 --- a/meta/classes/license_image.bbclass +++ b/meta/classes/license_image.bbclass | |||
@@ -51,8 +51,9 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True): | |||
51 | for pkg in sorted(pkg_dic): | 51 | for pkg in sorted(pkg_dic): |
52 | if bad_licenses and pkg not in whitelist: | 52 | if bad_licenses and pkg not in whitelist: |
53 | try: | 53 | try: |
54 | if incompatible_pkg_license(d, bad_licenses, pkg_dic[pkg]["LICENSE"]): | 54 | licenses = incompatible_pkg_license(d, bad_licenses, pkg_dic[pkg]["LICENSE"]) |
55 | bb.fatal("Package %s has an incompatible license %s and cannot be installed into the image." %(pkg, pkg_dic[pkg]["LICENSE"])) | 55 | if licenses: |
56 | bb.fatal("Package %s cannot be installed into the image because it has incompatible license(s): %s" %(pkg, ' '.join(licenses))) | ||
56 | (pkg_dic[pkg]["LICENSE"], pkg_dic[pkg]["LICENSES"]) = \ | 57 | (pkg_dic[pkg]["LICENSE"], pkg_dic[pkg]["LICENSES"]) = \ |
57 | oe.license.manifest_licenses(pkg_dic[pkg]["LICENSE"], | 58 | oe.license.manifest_licenses(pkg_dic[pkg]["LICENSE"], |
58 | bad_licenses, canonical_license, d) | 59 | bad_licenses, canonical_license, d) |
diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/meta/lib/oeqa/selftest/cases/incompatible_lic.py index 9d1e801117..458a940618 100644 --- a/meta/lib/oeqa/selftest/cases/incompatible_lic.py +++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py | |||
@@ -49,7 +49,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0" | |||
49 | 49 | ||
50 | def test_bash_default(self): | 50 | def test_bash_default(self): |
51 | self.write_config(self.default_config()) | 51 | self.write_config(self.default_config()) |
52 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash has an incompatible license GPLv3+ and cannot be installed into the image." | 52 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0+" |
53 | 53 | ||
54 | result = bitbake('core-image-minimal', ignore_status=True) | 54 | result = bitbake('core-image-minimal', ignore_status=True) |
55 | if error_msg not in result.output: | 55 | if error_msg not in result.output: |
@@ -57,7 +57,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0" | |||
57 | 57 | ||
58 | def test_bash_and_license(self): | 58 | def test_bash_and_license(self): |
59 | self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " & SomeLicense"') | 59 | self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " & SomeLicense"') |
60 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash has an incompatible license GPLv3+ & SomeLicense and cannot be installed into the image." | 60 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0+" |
61 | 61 | ||
62 | result = bitbake('core-image-minimal', ignore_status=True) | 62 | result = bitbake('core-image-minimal', ignore_status=True) |
63 | if error_msg not in result.output: | 63 | if error_msg not in result.output: |