diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-08-08 16:12:08 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-10 13:33:07 +0100 |
commit | a86252db8b3d60e20d509aae106f2f089fea9adc (patch) | |
tree | 0efc3842478fd5d5f18eb5c0debdb607244577f0 | |
parent | 073caff59944eae399ad0be1203cf0a7b11d93d0 (diff) | |
download | ast2050-yocto-poky-a86252db8b3d60e20d509aae106f2f089fea9adc.zip ast2050-yocto-poky-a86252db8b3d60e20d509aae106f2f089fea9adc.tar.gz |
image: add support for generally useful {dev,doc,dbg}-pkgs features
(From OE-Core rev: 7fd8fe53072d3bebb31da4e556878d3c25a10478)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/image.bbclass | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index e057329..54eb78b 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -6,8 +6,8 @@ inherit imagetest-${IMAGETEST} LICENSE = "MIT" PACKAGES = "" MULTILIB_IMAGE_INSTALL ?= "" -RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${FEATURE_INSTALL}" -RRECOMMENDS += "${FEATURE_INSTALL_OPTIONAL}" +RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${NORMAL_FEATURE_INSTALL}" +RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}" INHIBIT_DEFAULT_DEPS = "1" @@ -19,6 +19,36 @@ IMAGE_FEATURES[type] = "list" FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" +# packages to install from features, excluding dev/dbg/doc +NORMAL_FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(normal_groups(d), d))}" +NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(normal_groups(d), d))}" + +def normal_groups(d): + """Return all the IMAGE_FEATURES, with the exception of our special package groups""" + extras = set(['dev-pkgs', 'doc-pkgs', 'dbg-pkgs']) + features = set(oe.data.typed_value('IMAGE_FEATURES', d)) + return features.difference(extras) + +def normal_pkgs_to_install(d): + import oe.packagedata + + to_install = oe.data.typed_value('IMAGE_INSTALL', d) + features = normal_groups(d) + required = list(oe.packagegroup.required_packages(features, d)) + optional = list(oe.packagegroup.optional_packages(features, d)) + all_packages = to_install + required + optional + + recipes = filter(None, [oe.packagedata.recipename(pkg, d) for pkg in all_packages]) + + return all_packages + recipes + +PACKAGE_GROUP_dbg-pkgs = "${@' '.join('%s-dbg' % pkg for pkg in normal_pkgs_to_install(d))}" +PACKAGE_GROUP_dbg-pkgs[optional] = "1" +PACKAGE_GROUP_dev-pkgs = "${@' '.join('%s-dev' % pkg for pkg in normal_pkgs_to_install(d))}" +PACKAGE_GROUP_dev-pkgs[optional] = "1" +PACKAGE_GROUP_doc-pkgs = "${@' '.join('%s-doc' % pkg for pkg in normal_pkgs_to_install(d))}" +PACKAGE_GROUP_doc-pkgs[optional] = "1" + # "export IMAGE_BASENAME" not supported at this time IMAGE_INSTALL ?= "" IMAGE_INSTALL[type] = "list" |