[oe-commits] Andrei Gherzan : utils.py: Modify and rename distro_features_backfill python function
git at git.openembedded.org
git at git.openembedded.org
Wed Jul 11 16:50:03 UTC 2012
Module: openembedded-core.git
Branch: master-next
Commit: 849a4ec6122399b10727499785160428a4dbd7f4
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=849a4ec6122399b10727499785160428a4dbd7f4
Author: Andrei Gherzan <andrei at gherzan.ro>
Date: Tue Jul 10 17:59:18 2012 +0300
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.
---
meta/conf/bitbake.conf | 2 +-
meta/lib/oe/utils.py | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 76ee65f..0911b71 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -712,7 +712,7 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
DISTRO_FEATURES_BACKFILL = "pulseaudio"
-DISTRO_FEATURES_append = "${@oe.utils.distro_features_backfill(d)}"
+DISTRO_FEATURES_append = "${@oe.utils.features_backfill("DISTRO_FEATURES",d)}"
COMBINED_FEATURES = "\
${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} \
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 8912dac..5a19a76 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -89,15 +89,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:
More information about the Openembedded-commits
mailing list