aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_base.bbclass
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-01-27 10:05:10 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-11 11:50:29 +0000
commit907458935bab391f5bfba8f581ea9835078548d9 (patch)
treedce24256eceb2941857ed3b3c5981b99a2e5eb5f /meta/classes/populate_sdk_base.bbclass
parent417b27ce5c1ea2fe2057caa898291cce0c043359 (diff)
downloadopenembedded-core-contrib-907458935bab391f5bfba8f581ea9835078548d9.tar.gz
image.bbclass/populate_sdk_base.bbclass: shift position of sdk complementary install definition
The sdk complementary install operation was defined in image.bbclass, but the sdk recipe (such as meta-toolchain.bb) didn't inherit this bbclass but populate_sdk, and both of image and populate_sdk bbclass inherited populate_sdk_base bbclass, so move the sdk complementary install definition to populate_sdk_base bbclass fixed this issue. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Diffstat (limited to 'meta/classes/populate_sdk_base.bbclass')
-rw-r--r--meta/classes/populate_sdk_base.bbclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 0c17aac251..ee2a7c1d59 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -1,4 +1,25 @@
inherit meta toolchain-scripts
+
+# Wildcards specifying complementary packages to install for every package that has been explicitly
+# installed into the rootfs
+COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
+COMPLEMENTARY_GLOB[staticdev-pkgs] = '*-staticdev'
+COMPLEMENTARY_GLOB[doc-pkgs] = '*-doc'
+COMPLEMENTARY_GLOB[dbg-pkgs] = '*-dbg'
+COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest'
+
+def complementary_globs(featurevar, d):
+ all_globs = d.getVarFlags('COMPLEMENTARY_GLOB')
+ globs = []
+ features = set((d.getVar(featurevar, True) or '').split())
+ for name, glob in all_globs.items():
+ if name in features:
+ globs.append(glob)
+ return ' '.join(globs)
+
+SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs"
+SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}'
+
inherit populate_sdk_${IMAGE_PKGTYPE}
SDK_DIR = "${WORKDIR}/sdk"