aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/data_smart.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index b9d9476fd8..9594feebf3 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -157,32 +157,40 @@ class DataSmart:
if "_append" in self._special_values:
appends = self._special_values["_append"] or []
for append in appends:
+ keep = []
for (a, o) in self.getVarFlag(append, "_append") or []:
- # maybe the OVERRIDE was not yet added so keep the append
- if (o and o in overrides) or not o:
- self.delVarFlag(append, "_append")
if o and not o in overrides:
+ keep.append((a ,o))
continue
sval = self.getVar(append, False) or ""
sval += a
self.setVar(append, sval)
-
+ # We save overrides that may be applied at some later stage
+ if keep:
+ self.setVarFlag(append, "_append", keep)
+ else:
+ self.delVarFlag(append, "_append")
if "_prepend" in self._special_values:
prepends = self._special_values["_prepend"] or []
-
for prepend in prepends:
+ keep = []
for (a, o) in self.getVarFlag(prepend, "_prepend") or []:
- # maybe the OVERRIDE was not yet added so keep the prepend
- if (o and o in overrides) or not o:
- self.delVarFlag(prepend, "_prepend")
if o and not o in overrides:
+ keep.append((a ,o))
continue
sval = a + (self.getVar(prepend, False) or "")
self.setVar(prepend, sval)
+ # We save overrides that may be applied at some later stage
+ if keep:
+ self.setVarFlag(prepend, "_prepend", keep)
+ else:
+ self.delVarFlag(prepend, "_prepend")
+
+
def initVar(self, var):
self.expand_cache = {}
if not var in self.dict: