diff options
author | Mike Crowe <mac@mcrowe.com> | 2021-07-12 16:35:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-13 14:24:48 +0100 |
commit | eee8179f5b920d3f8907db23cbc061ed6770a02a (patch) | |
tree | 57acd6bf9d1c51d116711a64c4c5c48b45bff320 /meta/classes/license_image.bbclass | |
parent | bcd792270676beeac73f3900346184dec24d00a1 (diff) | |
download | openembedded-core-eee8179f5b920d3f8907db23cbc061ed6770a02a.tar.gz |
licence_image: Add lic-pkgs IMAGE_FEATURE
Installing license packages is similar to installing -dev or -dbg
packages, so let's invent a "lic-pkgs" IMAGE_FEATURE that does so and
document it in core-image.bbclass.
This image feature only works if LICENSE_CREATE_PACKAGE is set, so
refuse to generate an image if the lic-pkgs feature is enabled without
LICENSE_CREATE_PACKAGE.
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license_image.bbclass')
-rw-r--r-- | meta/classes/license_image.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass index 73cebb4d55..5dbec288a4 100644 --- a/meta/classes/license_image.bbclass +++ b/meta/classes/license_image.bbclass @@ -1,5 +1,15 @@ ROOTFS_LICENSE_DIR = "${IMAGE_ROOTFS}/usr/share/common-licenses" +# This requires LICENSE_CREATE_PACKAGE=1 to work too +COMPLEMENTARY_GLOB[lic-pkgs] = "*-lic" + +python() { + if not oe.data.typed_value('LICENSE_CREATE_PACKAGE', d): + features = set(oe.data.typed_value('IMAGE_FEATURES', d)) + if 'lic-pkgs' in features: + bb.error("'lic-pkgs' in IMAGE_FEATURES but LICENSE_CREATE_PACKAGE not enabled to generate -lic packages") +} + python write_package_manifest() { # Get list of installed packages license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}') |