diff options
author | Andrei Gherzan <andrei@gherzan.ro> | 2012-07-10 16:38:02 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-17 18:04:24 +0100 |
commit | 6bfb0c2d08c1b420dc7c65d31ac7034fc71829db (patch) | |
tree | 9609ab292fd592b76c30966bafabe53bd41f9682 /meta/lib | |
parent | d5fc43a4f266fb3a1178e4dcae7531bc099b9a16 (diff) | |
download | 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.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index e14743f3f3..8d3efe440c 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py | |||
@@ -87,15 +87,18 @@ def inherits(d, *classes): | |||
87 | """Return True if the metadata inherits any of the specified classes""" | 87 | """Return True if the metadata inherits any of the specified classes""" |
88 | return any(bb.data.inherits_class(cls, d) for cls in classes) | 88 | return any(bb.data.inherits_class(cls, d) for cls in classes) |
89 | 89 | ||
90 | def distro_features_backfill(d): | 90 | def features_backfill(var,d): |
91 | # This construct allows the addition of new features to variable specified | ||
92 | # as var | ||
93 | # Example for var = "DISTRO_FEATURES" | ||
91 | # This construct allows the addition of new features to DISTRO_FEATURES | 94 | # This construct allows the addition of new features to DISTRO_FEATURES |
92 | # that if not present would disable existing functionality, without | 95 | # that if not present would disable existing functionality, without |
93 | # disturbing distributions that have already set DISTRO_FEATURES. | 96 | # disturbing distributions that have already set DISTRO_FEATURES. |
94 | # Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should | 97 | # Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should |
95 | # add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED | 98 | # add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED |
96 | 99 | ||
97 | backfill = (d.getVar("DISTRO_FEATURES_BACKFILL", True) or "").split() | 100 | backfill = (d.getVar(var+"_BACKFILL", True) or "").split() |
98 | considered = (d.getVar("DISTRO_FEATURES_BACKFILL_CONSIDERED", True) or "").split() | 101 | considered = (d.getVar(var+"_BACKFILL_CONSIDERED", True) or "").split() |
99 | 102 | ||
100 | addfeatures = [] | 103 | addfeatures = [] |
101 | for feature in backfill: | 104 | for feature in backfill: |