[oe-commits] Andrei Gherzan : utils.py: Modify and rename distro_features_backfill python function

git at git.openembedded.org git at git.openembedded.org
Fri Aug 17 17:09:31 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 8ae08529e844c9e065c1d260535a777f85d8c6cc
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=8ae08529e844c9e065c1d260535a777f85d8c6cc

Author: Andrei Gherzan <andrei at gherzan.ro>
Date:   Tue Jul 10 16:38:02 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.

Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/lib/oe/utils.py |    9 ++++++---
 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:





More information about the Openembedded-commits mailing list