diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-03-06 16:46:10 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-07 14:45:21 +0000 |
commit | d14090ab7309936b0b84f7056094a1df40064d9e (patch) | |
tree | 48f9a2c72d874eeb287f933dda8736e639d73ad2 /meta | |
parent | 874ab5a568ddbd5b140915c1330e6513e9892666 (diff) | |
download | poky-d14090ab7309936b0b84f7056094a1df40064d9e.tar.gz |
Rename PACKAGE_GROUP variable to FEATURE_PACKAGES
Since tasks were renamed to packagegroups some time ago, this variable
name implies that its usage is necessarily related to them which is not
the case. Rename the variable to more closely represent what it does
(whilst still providing backwards-compatibility with a warning for
PACKAGE_GROUP).
(From OE-Core rev: d703e07ea5056624101e1bc48f10d25b602635e9)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/core-image.bbclass | 26 | ||||
-rw-r--r-- | meta/classes/image.bbclass | 7 | ||||
-rw-r--r-- | meta/lib/oe/packagegroup.py | 25 |
3 files changed, 34 insertions, 24 deletions
diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index 0958702660..7475d7d8d5 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass | |||
@@ -32,19 +32,19 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d | |||
32 | # - doc-pkgs - documentation packages for all installed packages in the rootfs | 32 | # - doc-pkgs - documentation packages for all installed packages in the rootfs |
33 | # - read-only-rootfs - tweaks an image to support read-only rootfs | 33 | # - read-only-rootfs - tweaks an image to support read-only rootfs |
34 | # | 34 | # |
35 | PACKAGE_GROUP_x11 = "packagegroup-core-x11" | 35 | FEATURE_PACKAGES_x11 = "packagegroup-core-x11" |
36 | PACKAGE_GROUP_x11-base = "packagegroup-core-x11-base" | 36 | FEATURE_PACKAGES_x11-base = "packagegroup-core-x11-base" |
37 | PACKAGE_GROUP_x11-sato = "packagegroup-core-x11-sato" | 37 | FEATURE_PACKAGES_x11-sato = "packagegroup-core-x11-sato" |
38 | PACKAGE_GROUP_tools-debug = "packagegroup-core-tools-debug" | 38 | FEATURE_PACKAGES_tools-debug = "packagegroup-core-tools-debug" |
39 | PACKAGE_GROUP_eclipse-debug = "packagegroup-core-eclipse-debug" | 39 | FEATURE_PACKAGES_eclipse-debug = "packagegroup-core-eclipse-debug" |
40 | PACKAGE_GROUP_tools-profile = "packagegroup-core-tools-profile" | 40 | FEATURE_PACKAGES_tools-profile = "packagegroup-core-tools-profile" |
41 | PACKAGE_GROUP_tools-testapps = "packagegroup-core-tools-testapps" | 41 | FEATURE_PACKAGES_tools-testapps = "packagegroup-core-tools-testapps" |
42 | PACKAGE_GROUP_tools-sdk = "packagegroup-core-sdk packagegroup-core-standalone-sdk-target" | 42 | FEATURE_PACKAGES_tools-sdk = "packagegroup-core-sdk packagegroup-core-standalone-sdk-target" |
43 | PACKAGE_GROUP_nfs-server = "packagegroup-core-nfs-server" | 43 | FEATURE_PACKAGES_nfs-server = "packagegroup-core-nfs-server" |
44 | PACKAGE_GROUP_ssh-server-dropbear = "packagegroup-core-ssh-dropbear" | 44 | FEATURE_PACKAGES_ssh-server-dropbear = "packagegroup-core-ssh-dropbear" |
45 | PACKAGE_GROUP_ssh-server-openssh = "packagegroup-core-ssh-openssh" | 45 | FEATURE_PACKAGES_ssh-server-openssh = "packagegroup-core-ssh-openssh" |
46 | PACKAGE_GROUP_qt4-pkgs = "packagegroup-core-qt-demoapps" | 46 | FEATURE_PACKAGES_qt4-pkgs = "packagegroup-core-qt-demoapps" |
47 | PACKAGE_GROUP_hwcodecs = "${MACHINE_HWCODECS}" | 47 | FEATURE_PACKAGES_hwcodecs = "${MACHINE_HWCODECS}" |
48 | 48 | ||
49 | 49 | ||
50 | # IMAGE_FEATURES_REPLACES_foo = 'bar1 bar2' | 50 | # IMAGE_FEATURES_REPLACES_foo = 'bar1 bar2' |
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 7529212ee8..51d16d7d55 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -32,9 +32,9 @@ FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_v | |||
32 | FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" | 32 | FEATURE_INSTALL_OPTIONAL = "${@' '.join(oe.packagegroup.optional_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}" |
33 | 33 | ||
34 | # Define some very basic feature package groups | 34 | # Define some very basic feature package groups |
35 | PACKAGE_GROUP_package-management = "${ROOTFS_PKGMANAGE}" | 35 | FEATURE_PACKAGES_package-management = "${ROOTFS_PKGMANAGE}" |
36 | SPLASH ?= "psplash" | 36 | SPLASH ?= "psplash" |
37 | PACKAGE_GROUP_splash = "${SPLASH}" | 37 | FEATURE_PACKAGES_splash = "${SPLASH}" |
38 | 38 | ||
39 | IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' | 39 | IMAGE_INSTALL_COMPLEMENTARY = '${@complementary_globs("IMAGE_FEATURES", d)}' |
40 | 40 | ||
@@ -43,7 +43,10 @@ def check_image_features(d): | |||
43 | valid_features += d.getVarFlags('COMPLEMENTARY_GLOB').keys() | 43 | valid_features += d.getVarFlags('COMPLEMENTARY_GLOB').keys() |
44 | for var in d: | 44 | for var in d: |
45 | if var.startswith("PACKAGE_GROUP_"): | 45 | if var.startswith("PACKAGE_GROUP_"): |
46 | bb.warn("PACKAGE_GROUP is deprecated, please use FEATURE_PACKAGES instead") | ||
46 | valid_features.append(var[14:]) | 47 | valid_features.append(var[14:]) |
48 | elif var.startswith("FEATURE_PACKAGES_"): | ||
49 | valid_features.append(var[17:]) | ||
47 | valid_features.sort() | 50 | valid_features.sort() |
48 | 51 | ||
49 | features = set(oe.data.typed_value('IMAGE_FEATURES', d)) | 52 | features = set(oe.data.typed_value('IMAGE_FEATURES', d)) |
diff --git a/meta/lib/oe/packagegroup.py b/meta/lib/oe/packagegroup.py index b04c45a1af..12eb4212ff 100644 --- a/meta/lib/oe/packagegroup.py +++ b/meta/lib/oe/packagegroup.py | |||
@@ -1,19 +1,26 @@ | |||
1 | import itertools | 1 | import itertools |
2 | 2 | ||
3 | def is_optional(group, d): | 3 | def is_optional(feature, d): |
4 | return bool(d.getVarFlag("PACKAGE_GROUP_%s" % group, "optional")) | 4 | packages = d.getVar("FEATURE_PACKAGES_%s" % feature, True) |
5 | if packages: | ||
6 | return bool(d.getVarFlag("FEATURE_PACKAGES_%s" % feature, "optional")) | ||
7 | else: | ||
8 | return bool(d.getVarFlag("PACKAGE_GROUP_%s" % feature, "optional")) | ||
5 | 9 | ||
6 | def packages(groups, d): | 10 | def packages(features, d): |
7 | for group in groups: | 11 | for feature in features: |
8 | for pkg in (d.getVar("PACKAGE_GROUP_%s" % group, True) or "").split(): | 12 | packages = d.getVar("FEATURE_PACKAGES_%s" % feature, True) |
13 | if not packages: | ||
14 | packages = d.getVar("PACKAGE_GROUP_%s" % feature, True) | ||
15 | for pkg in (packages or "").split(): | ||
9 | yield pkg | 16 | yield pkg |
10 | 17 | ||
11 | def required_packages(groups, d): | 18 | def required_packages(features, d): |
12 | req = filter(lambda group: not is_optional(group, d), groups) | 19 | req = filter(lambda feature: not is_optional(feature, d), features) |
13 | return packages(req, d) | 20 | return packages(req, d) |
14 | 21 | ||
15 | def optional_packages(groups, d): | 22 | def optional_packages(features, d): |
16 | opt = filter(lambda group: is_optional(group, d), groups) | 23 | opt = filter(lambda feature: is_optional(feature, d), features) |
17 | return packages(opt, d) | 24 | return packages(opt, d) |
18 | 25 | ||
19 | def active_packages(features, d): | 26 | def active_packages(features, d): |