summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/data_smart.py27
1 files changed, 22 insertions, 5 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 7bb7b4aae3..b433489a84 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -429,12 +429,13 @@ class DataSmart(MutableMapping):
429 continue 429 continue
430 430
431 if op == "_append": 431 if op == "_append":
432 sval = self.getVar(append, False) or "" 432 apps = self.getVarFlag(append, "_appendactive", False) or []
433 sval += a 433 apps.extend([a])
434 self.setVar(append, sval) 434 self.setVarFlag(append, "_appendactive", apps, ignore=True)
435 elif op == "_prepend": 435 elif op == "_prepend":
436 sval = a + (self.getVar(append, False) or "") 436 prepends = self.getVarFlag(append, "_prependactive", False) or []
437 self.setVar(append, sval) 437 prepends.extend([a])
438 self.setVarFlag(append, "_prependactive", prepends, ignore=True)
438 elif op == "_remove": 439 elif op == "_remove":
439 removes = self.getVarFlag(append, "_removeactive", False) or [] 440 removes = self.getVarFlag(append, "_removeactive", False) or []
440 removes.extend(a.split()) 441 removes.extend(a.split())
@@ -507,6 +508,11 @@ class DataSmart(MutableMapping):
507 if not var in self.dict: 508 if not var in self.dict:
508 self._makeShadowCopy(var) 509 self._makeShadowCopy(var)
509 510
511 if "_appendactive" in self.dict[var]:
512 del self.dict[var]["_appendactive"]
513 if "_prependactive" in self.dict[var]:
514 del self.dict[var]["_prependactive"]
515
510 # more cookies for the cookie monster 516 # more cookies for the cookie monster
511 if '_' in var: 517 if '_' in var:
512 self._setvar_update_overrides(var) 518 self._setvar_update_overrides(var)
@@ -612,6 +618,17 @@ class DataSmart(MutableMapping):
612 value = copy.copy(local_var[flag]) 618 value = copy.copy(local_var[flag])
613 elif flag == "_content" and "_defaultval" in local_var and not noweakdefault: 619 elif flag == "_content" and "_defaultval" in local_var and not noweakdefault:
614 value = copy.copy(local_var["_defaultval"]) 620 value = copy.copy(local_var["_defaultval"])
621
622 if flag == "_content" and local_var is not None and "_appendactive" in local_var:
623 if not value:
624 value = ""
625 for r in local_var["_appendactive"]:
626 value = value + r
627 if flag == "_content" and local_var is not None and "_prependactive" in local_var:
628 if not value:
629 value = ""
630 for r in local_var["_prependactive"]:
631 value = r + value
615 if expand and value: 632 if expand and value:
616 # Only getvar (flag == _content) hits the expand cache 633 # Only getvar (flag == _content) hits the expand cache
617 cachename = None 634 cachename = None