1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

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.

(From OE-Core rev: eee8179f5b920d3f8907db23cbc061ed6770a02a)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mike Crowe
2021-07-12 16:35:58 +01:00
committed by Richard Purdie
parent b59f420dea
commit 72e4483f12
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -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}')