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:25:11 +0100 |
commit | 7fd8fe53072d3bebb31da4e556878d3c25a10478 (patch) | |
tree | 604e5546d2370df30c0b4df41f178fec8c60b2e7 /meta | |
parent | f9f4416a8cfbd37c7d3a8eb19ee82820e2e6b38c (diff) | |
download | openembedded-core-7fd8fe53072d3bebb31da4e556878d3c25a10478.tar.gz openembedded-core-7fd8fe53072d3bebb31da4e556878d3c25a10478.tar.bz2 openembedded-core-7fd8fe53072d3bebb31da4e556878d3c25a10478.zip |
image: add support for generally useful {dev,doc,dbg}-pkgs features
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'meta')
-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 e057329017..54eb78b7c9 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" |