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 /meta/classes/image.bbclass | |
parent | 073caff59944eae399ad0be1203cf0a7b11d93d0 (diff) | |
download | 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>
Diffstat (limited to 'meta/classes/image.bbclass')
-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} | |||
6 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
7 | PACKAGES = "" | 7 | PACKAGES = "" |
8 | MULTILIB_IMAGE_INSTALL ?= "" | 8 | MULTILIB_IMAGE_INSTALL ?= "" |
9 | RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${FEATURE_INSTALL}" | 9 | RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${NORMAL_FEATURE_INSTALL}" |
10 | RRECOMMENDS += "${FEATURE_INSTALL_OPTIONAL}" | 10 | RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}" |
11 | 11 | ||
12 | INHIBIT_DEFAULT_DEPS = "1" | 12 | INHIBIT_DEFAULT_DEPS = "1" |
13 | 13 | ||
@@ -19,6 +19,36 @@ IMAGE_FEATURES[type] = "list" | |||
19 | FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" | 19 | FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" |
20 | FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" | 20 | FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" |
21 | 21 | ||
22 | # packages to install from features, excluding dev/dbg/doc | ||
23 | NORMAL_FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(normal_groups(d), d))}" | ||
24 | NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(normal_groups(d), d))}" | ||
25 | |||
26 | def normal_groups(d): | ||
27 | """Return all the IMAGE_FEATURES, with the exception of our special package groups""" | ||
28 | extras = set(['dev-pkgs', 'doc-pkgs', 'dbg-pkgs']) | ||
29 | features = set(oe.data.typed_value('IMAGE_FEATURES', d)) | ||
30 | return features.difference(extras) | ||
31 | |||
32 | def normal_pkgs_to_install(d): | ||
33 | import oe.packagedata | ||
34 | |||
35 | to_install = oe.data.typed_value('IMAGE_INSTALL', d) | ||
36 | features = normal_groups(d) | ||
37 | required = list(oe.packagegroup.required_packages(features, d)) | ||
38 | optional = list(oe.packagegroup.optional_packages(features, d)) | ||
39 | all_packages = to_install + required + optional | ||
40 | |||
41 | recipes = filter(None, [oe.packagedata.recipename(pkg, d) for pkg in all_packages]) | ||
42 | |||
43 | return all_packages + recipes | ||
44 | |||
45 | PACKAGE_GROUP_dbg-pkgs = "${@' '.join('%s-dbg' % pkg for pkg in normal_pkgs_to_install(d))}" | ||
46 | PACKAGE_GROUP_dbg-pkgs[optional] = "1" | ||
47 | PACKAGE_GROUP_dev-pkgs = "${@' '.join('%s-dev' % pkg for pkg in normal_pkgs_to_install(d))}" | ||
48 | PACKAGE_GROUP_dev-pkgs[optional] = "1" | ||
49 | PACKAGE_GROUP_doc-pkgs = "${@' '.join('%s-doc' % pkg for pkg in normal_pkgs_to_install(d))}" | ||
50 | PACKAGE_GROUP_doc-pkgs[optional] = "1" | ||
51 | |||
22 | # "export IMAGE_BASENAME" not supported at this time | 52 | # "export IMAGE_BASENAME" not supported at this time |
23 | IMAGE_INSTALL ?= "" | 53 | IMAGE_INSTALL ?= "" |
24 | IMAGE_INSTALL[type] = "list" | 54 | IMAGE_INSTALL[type] = "list" |