summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-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:
157 if "_append" in self._special_values: 157 if "_append" in self._special_values:
158 appends = self._special_values["_append"] or [] 158 appends = self._special_values["_append"] or []
159 for append in appends: 159 for append in appends:
160 keep = []
160 for (a, o) in self.getVarFlag(append, "_append") or []: 161 for (a, o) in self.getVarFlag(append, "_append") or []:
161 # maybe the OVERRIDE was not yet added so keep the append
162 if (o and o in overrides) or not o:
163 self.delVarFlag(append, "_append")
164 if o and not o in overrides: 162 if o and not o in overrides:
163 keep.append((a ,o))
165 continue 164 continue
166 165
167 sval = self.getVar(append, False) or "" 166 sval = self.getVar(append, False) or ""
168 sval += a 167 sval += a
169 self.setVar(append, sval) 168 self.setVar(append, sval)
170 169 # We save overrides that may be applied at some later stage
170 if keep:
171 self.setVarFlag(append, "_append", keep)
172 else:
173 self.delVarFlag(append, "_append")
171 174
172 if "_prepend" in self._special_values: 175 if "_prepend" in self._special_values:
173 prepends = self._special_values["_prepend"] or [] 176 prepends = self._special_values["_prepend"] or []
174
175 for prepend in prepends: 177 for prepend in prepends:
178 keep = []
176 for (a, o) in self.getVarFlag(prepend, "_prepend") or []: 179 for (a, o) in self.getVarFlag(prepend, "_prepend") or []:
177 # maybe the OVERRIDE was not yet added so keep the prepend
178 if (o and o in overrides) or not o:
179 self.delVarFlag(prepend, "_prepend")
180 if o and not o in overrides: 180 if o and not o in overrides:
181 keep.append((a ,o))
181 continue 182 continue
182 183
183 sval = a + (self.getVar(prepend, False) or "") 184 sval = a + (self.getVar(prepend, False) or "")
184 self.setVar(prepend, sval) 185 self.setVar(prepend, sval)
185 186
187 # We save overrides that may be applied at some later stage
188 if keep:
189 self.setVarFlag(prepend, "_prepend", keep)
190 else:
191 self.delVarFlag(prepend, "_prepend")
192
193
186 def initVar(self, var): 194 def initVar(self, var):
187 self.expand_cache = {} 195 self.expand_cache = {}
188 if not var in self.dict: 196 if not var in self.dict: