diff options
-rw-r--r-- | meta/classes/image.bbclass | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index ffb372aebb..5bc0ca2d66 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -33,7 +33,7 @@ NORMAL_FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages | |||
33 | 33 | ||
34 | def normal_groups(d): | 34 | def normal_groups(d): |
35 | """Return all the IMAGE_FEATURES, with the exception of our special package groups""" | 35 | """Return all the IMAGE_FEATURES, with the exception of our special package groups""" |
36 | extras = set(['dev-pkgs', 'staticdev-pkgs', 'doc-pkgs', 'dbg-pkgs', 'ptest-pkgs']) | 36 | extras = set(d.getVarFlags('COMPLEMENTARY_GLOB').keys()) |
37 | features = set(oe.data.typed_value('IMAGE_FEATURES', d)) | 37 | features = set(oe.data.typed_value('IMAGE_FEATURES', d)) |
38 | return features.difference(extras) | 38 | return features.difference(extras) |
39 | 39 | ||
@@ -43,20 +43,19 @@ PACKAGE_GROUP_splash = "${SPLASH}" | |||
43 | 43 | ||
44 | # Wildcards specifying complementary packages to install for every package that has been explicitly | 44 | # Wildcards specifying complementary packages to install for every package that has been explicitly |
45 | # installed into the rootfs | 45 | # installed into the rootfs |
46 | COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev' | ||
47 | COMPLEMENTARY_GLOB[staticdev-pkgs] = '*-staticdev' | ||
48 | COMPLEMENTARY_GLOB[doc-pkgs] = '*-doc' | ||
49 | COMPLEMENTARY_GLOB[dbg-pkgs] = '*-dbg' | ||
50 | COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest' | ||
51 | |||
46 | def complementary_globs(featurevar, d): | 52 | def complementary_globs(featurevar, d): |
53 | all_globs = d.getVarFlags('COMPLEMENTARY_GLOB') | ||
47 | globs = [] | 54 | globs = [] |
48 | features = set((d.getVar(featurevar, True) or '').split()) | 55 | features = set((d.getVar(featurevar, True) or '').split()) |
49 | for feature in features: | 56 | for name, glob in all_globs.items(): |
50 | if feature == 'dev-pkgs': | 57 | if name in features: |
51 | globs.append('*-dev') | 58 | globs.append(glob) |
52 | elif feature == 'staticdev-pkgs': | ||
53 | globs.append('*-staticdev') | ||
54 | elif feature == 'doc-pkgs': | ||
55 | globs.append('*-doc') | ||
56 | elif feature == 'dbg-pkgs': | ||
57 | globs.append('*-dbg') | ||
58 | elif feature == 'ptest-pkgs': | ||
59 | globs.append('*-ptest') | ||
60 | return ' '.join(globs) | 59 | return ' '.join(globs) |
61 | 60 | ||
62 | IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' | 61 | IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' |