From e36d12a9c1cf69540079e48a1dfadbc343758e48 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 3 Jul 2012 12:43:32 +0800 Subject: image/core-image: Handle conflicting IMAGE_FEATURES. IMAGE_FEATURES such as 'ssh-server-dropbear' and 'ssh-server-openssh' can't be both enabled. User can use the following variables to define the relationship of image features: IMAGE_FEATURES_REPLACES_foo = "bar" means including image feature "foo" would replace the image feature "bar". IMAGE_FEATURES_CONFLICTS_foo = "bar" means including both image features "foo" and "bar" would cause an parsing error. Signed-off-by: Lianhao Lu Signed-off-by: Richard Purdie --- meta/classes/core-image.bbclass | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'meta/classes/core-image.bbclass') diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index 25f5c5a8dc..6b207d7cfa 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass @@ -47,6 +47,14 @@ PACKAGE_GROUP_ssh-server-openssh = "task-core-ssh-openssh" PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}" PACKAGE_GROUP_qt4-pkgs = "task-core-qt-demos" + +# IMAGE_FEAETURES_REPLACES_foo = 'bar1 bar2' +# Including image feature foo would replace the image features bar1 and bar2 +IMAGE_FEATURES_REPLACES_ssh-server-openssh = "ssh-server-dropbear" + +# IMAGE_FEATURES_CONFLICTS_foo = 'bar1 bar2' +# An error exception would be raised if both image features foo and bar1(or bar2) are included + CORE_IMAGE_BASE_INSTALL = '\ task-core-boot \ task-base-extended \ @@ -60,7 +68,8 @@ IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}" X11_IMAGE_FEATURES = "x11-base apps-x11-core package-management" ENHANCED_IMAGE_FEATURES = "${X11_IMAGE_FEATURES} apps-x11-games apps-x11-pimlico package-management" -SATO_IMAGE_FEATURES = "${ENHANCED_IMAGE_FEATURES} x11-sato ssh-server-dropbear" +SSHSERVER_IMAGE_FEATURES ??= "ssh-server-dropbear" +SATO_IMAGE_FEATURES = "${ENHANCED_IMAGE_FEATURES} x11-sato ${SSHSERVER_IMAGE_FEATURES}" inherit image -- cgit 1.2.3-korg