summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2012-07-10 16:38:02 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-17 18:04:24 +0100
commit6bfb0c2d08c1b420dc7c65d31ac7034fc71829db (patch)
tree9609ab292fd592b76c30966bafabe53bd41f9682 /meta/lib
parentd5fc43a4f266fb3a1178e4dcae7531bc099b9a16 (diff)
downloadast2050-yocto-poky-6bfb0c2d08c1b420dc7c65d31ac7034fc71829db.zip
ast2050-yocto-poky-6bfb0c2d08c1b420dc7c65d31ac7034fc71829db.tar.gz
utils.py: Modify and rename distro_features_backfill python function
This function was written to be used with DISTRO_FEATURES. This behavior is usefull with MACHINE_FEATURES as well. (From OE-Core rev: 8ae08529e844c9e065c1d260535a777f85d8c6cc) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/utils.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index e14743f..8d3efe4 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -87,15 +87,18 @@ def inherits(d, *classes):
"""Return True if the metadata inherits any of the specified classes"""
return any(bb.data.inherits_class(cls, d) for cls in classes)
-def distro_features_backfill(d):
+def features_backfill(var,d):
+ # This construct allows the addition of new features to variable specified
+ # as var
+ # Example for var = "DISTRO_FEATURES"
# This construct allows the addition of new features to DISTRO_FEATURES
# that if not present would disable existing functionality, without
# disturbing distributions that have already set DISTRO_FEATURES.
# Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should
# add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED
- backfill = (d.getVar("DISTRO_FEATURES_BACKFILL", True) or "").split()
- considered = (d.getVar("DISTRO_FEATURES_BACKFILL_CONSIDERED", True) or "").split()
+ backfill = (d.getVar(var+"_BACKFILL", True) or "").split()
+ considered = (d.getVar(var+"_BACKFILL_CONSIDERED", True) or "").split()
addfeatures = []
for feature in backfill:
OpenPOWER on IntegriCloud