summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-08-08 16:12:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-10 13:33:07 +0100
commita86252db8b3d60e20d509aae106f2f089fea9adc (patch)
tree0efc3842478fd5d5f18eb5c0debdb607244577f0 /meta/classes/image.bbclass
parent073caff59944eae399ad0be1203cf0a7b11d93d0 (diff)
downloadpoky-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.bbclass34
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}
6LICENSE = "MIT" 6LICENSE = "MIT"
7PACKAGES = "" 7PACKAGES = ""
8MULTILIB_IMAGE_INSTALL ?= "" 8MULTILIB_IMAGE_INSTALL ?= ""
9RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${FEATURE_INSTALL}" 9RDEPENDS += "${IMAGE_INSTALL} ${LINGUAS_INSTALL} ${MULTILIB_IMAGE_INSTALL} ${NORMAL_FEATURE_INSTALL}"
10RRECOMMENDS += "${FEATURE_INSTALL_OPTIONAL}" 10RRECOMMENDS += "${NORMAL_FEATURE_INSTALL_OPTIONAL}"
11 11
12INHIBIT_DEFAULT_DEPS = "1" 12INHIBIT_DEFAULT_DEPS = "1"
13 13
@@ -19,6 +19,36 @@ IMAGE_FEATURES[type] = "list"
19FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" 19FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
20FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" 20FEATURE_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
23NORMAL_FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(normal_groups(d), d))}"
24NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(normal_groups(d), d))}"
25
26def 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
32def 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
45PACKAGE_GROUP_dbg-pkgs = "${@' '.join('%s-dbg' % pkg for pkg in normal_pkgs_to_install(d))}"
46PACKAGE_GROUP_dbg-pkgs[optional] = "1"
47PACKAGE_GROUP_dev-pkgs = "${@' '.join('%s-dev' % pkg for pkg in normal_pkgs_to_install(d))}"
48PACKAGE_GROUP_dev-pkgs[optional] = "1"
49PACKAGE_GROUP_doc-pkgs = "${@' '.join('%s-doc' % pkg for pkg in normal_pkgs_to_install(d))}"
50PACKAGE_GROUP_doc-pkgs[optional] = "1"
51
22# "export IMAGE_BASENAME" not supported at this time 52# "export IMAGE_BASENAME" not supported at this time
23IMAGE_INSTALL ?= "" 53IMAGE_INSTALL ?= ""
24IMAGE_INSTALL[type] = "list" 54IMAGE_INSTALL[type] = "list"