diff options
-rw-r--r-- | meta/classes/image.bbclass | 19 | ||||
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 21 |
2 files changed, 21 insertions, 19 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index e5ec42ce3d..8f4be13796 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -35,26 +35,7 @@ FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.dat | |||
35 | SPLASH ?= "psplash" | 35 | SPLASH ?= "psplash" |
36 | PACKAGE_GROUP_splash = "${SPLASH}" | 36 | PACKAGE_GROUP_splash = "${SPLASH}" |
37 | 37 | ||
38 | # Wildcards specifying complementary packages to install for every package that has been explicitly | ||
39 | # installed into the rootfs | ||
40 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' | ||
41 | COMPLEMENTARY_GLOB[staticdev-pkgs] = '*-staticdev' | ||
42 | COMPLEMENTARY_GLOB[doc-pkgs] = '*-doc' | ||
43 | COMPLEMENTARY_GLOB[dbg-pkgs] = '*-dbg' | ||
44 | COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest' | ||
45 | |||
46 | def complementary_globs(featurevar, d): | ||
47 | all_globs = d.getVarFlags('COMPLEMENTARY_GLOB') | ||
48 | globs = [] | ||
49 | features = set((d.getVar(featurevar, True) or '').split()) | ||
50 | for name, glob in all_globs.items(): | ||
51 | if name in features: | ||
52 | globs.append(glob) | ||
53 | return ' '.join(globs) | ||
54 | |||
55 | IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' | 38 | IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' |
56 | SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs" | ||
57 | SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}' | ||
58 | 39 | ||
59 | def check_image_features(d): | 40 | def check_image_features(d): |
60 | valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems', True) or "").split() | 41 | valid_features = (d.getVarFlag('IMAGE_FEATURES', 'validitems', True) or "").split() |
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 @@ | |||
1 | inherit meta toolchain-scripts | 1 | inherit meta toolchain-scripts |
2 | |||
3 | # Wildcards specifying complementary packages to install for every package that has been explicitly | ||
4 | # installed into the rootfs | ||
5 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' | ||
6 | COMPLEMENTARY_GLOB[staticdev-pkgs] = '*-staticdev' | ||
7 | COMPLEMENTARY_GLOB[doc-pkgs] = '*-doc' | ||
8 | COMPLEMENTARY_GLOB[dbg-pkgs] = '*-dbg' | ||
9 | COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest' | ||
10 | |||
11 | def complementary_globs(featurevar, d): | ||
12 | all_globs = d.getVarFlags('COMPLEMENTARY_GLOB') | ||
13 | globs = [] | ||
14 | features = set((d.getVar(featurevar, True) or '').split()) | ||
15 | for name, glob in all_globs.items(): | ||
16 | if name in features: | ||
17 | globs.append(glob) | ||
18 | return ' '.join(globs) | ||
19 | |||
20 | SDKIMAGE_FEATURES ??= "dev-pkgs dbg-pkgs" | ||
21 | SDKIMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("SDKIMAGE_FEATURES", d)}' | ||
22 | |||
2 | inherit populate_sdk_${IMAGE_PKGTYPE} | 23 | inherit populate_sdk_${IMAGE_PKGTYPE} |
3 | 24 | ||
4 | SDK_DIR = "${WORKDIR}/sdk" | 25 | SDK_DIR = "${WORKDIR}/sdk" |