base.bbclass: don't backfill features that already exist
It's too easy to cause rebuilds because the DISTRO_FEATURES have changed in meaningless ways (such as re-ordering or duplicate items). Help stop this by checking if the feature to be back-filled is already present. (From OE-Core rev: 63c7192119d54b92d908441109ed4e4fff761cba) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
9b4e10acc5
commit
0aad8decf0
|
@ -292,8 +292,8 @@ python base_eventhandler() {
|
||||||
e.data.setVar('BB_VERSION', bb.__version__)
|
e.data.setVar('BB_VERSION', bb.__version__)
|
||||||
pkgarch_mapping(e.data)
|
pkgarch_mapping(e.data)
|
||||||
preferred_ml_updates(e.data)
|
preferred_ml_updates(e.data)
|
||||||
e.data.appendVar('DISTRO_FEATURES', oe.utils.features_backfill("DISTRO_FEATURES", e.data))
|
oe.utils.features_backfill("DISTRO_FEATURES", e.data)
|
||||||
e.data.appendVar('MACHINE_FEATURES', oe.utils.features_backfill("MACHINE_FEATURES", e.data))
|
oe.utils.features_backfill("MACHINE_FEATURES", e.data)
|
||||||
|
|
||||||
if isinstance(e, bb.event.BuildStarted):
|
if isinstance(e, bb.event.BuildStarted):
|
||||||
statuslines = []
|
statuslines = []
|
||||||
|
|
|
@ -96,16 +96,14 @@ def features_backfill(var,d):
|
||||||
# disturbing distributions that have already set DISTRO_FEATURES.
|
# disturbing distributions that have already set DISTRO_FEATURES.
|
||||||
# Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should
|
# Distributions wanting to elide a value in DISTRO_FEATURES_BACKFILL should
|
||||||
# add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED
|
# add the feature to DISTRO_FEATURES_BACKFILL_CONSIDERED
|
||||||
|
features = (d.getVar(var, True) or "").split()
|
||||||
backfill = (d.getVar(var+"_BACKFILL", True) or "").split()
|
backfill = (d.getVar(var+"_BACKFILL", True) or "").split()
|
||||||
considered = (d.getVar(var+"_BACKFILL_CONSIDERED", True) or "").split()
|
considered = (d.getVar(var+"_BACKFILL_CONSIDERED", True) or "").split()
|
||||||
|
|
||||||
addfeatures = []
|
addfeatures = []
|
||||||
for feature in backfill:
|
for feature in backfill:
|
||||||
if feature not in considered:
|
if feature not in features and feature not in considered:
|
||||||
addfeatures.append(feature)
|
addfeatures.append(feature)
|
||||||
|
|
||||||
if addfeatures:
|
if addfeatures:
|
||||||
return " %s" % (" ".join(addfeatures))
|
d.appendVar(var, " " + " ".join(addfeatures))
|
||||||
else:
|
|
||||||
return ""
|
|
||||||
|
|
Loading…
Reference in New Issue