summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-03-06 16:46:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-07 14:45:21 +0000
commitd14090ab7309936b0b84f7056094a1df40064d9e (patch)
tree48f9a2c72d874eeb287f933dda8736e639d73ad2 /meta/lib/oe
parent874ab5a568ddbd5b140915c1330e6513e9892666 (diff)
downloadpoky-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/lib/oe')
-rw-r--r--meta/lib/oe/packagegroup.py25
1 files changed, 16 insertions, 9 deletions
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 @@
1import itertools 1import itertools
2 2
3def is_optional(group, d): 3def 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
6def packages(groups, d): 10def 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
11def required_packages(groups, d): 18def 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
15def optional_packages(groups, d): 22def 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
19def active_packages(features, d): 26def active_packages(features, d):