summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-11 23:11:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-12 22:50:46 +0100
commit4c386e1dd5df8e1bfb675f1a7f47c1162ec76d07 (patch)
tree9c715c202b5e04c194407923a1b20235a96e0f3f /bitbake/lib/bb
parent75a58555abf265703dbf2641dc4476610c41ad5a (diff)
downloadpoky-4c386e1dd5df8e1bfb675f1a7f47c1162ec76d07.tar.gz
bitbake: data_smart: Fix appendVar/prependVar
Now that overrides get expanded 'on the fly', change appendVar and prependVar to work using _append and _prepend, else we'd have to re-implement pieces of getVar and the timing of expansions becomes problematic. Using _append/_prepend equivalence gives the behaviour users likley expect from these functions. (Bitbake rev: 40d661aaf7a563c6447b073310c5f2fdae6ca3d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/data_smart.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index b7ccab767e..7755f1afd8 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -540,14 +540,12 @@ class DataSmart(MutableMapping):
540 def appendVar(self, var, value, **loginfo): 540 def appendVar(self, var, value, **loginfo):
541 loginfo['op'] = 'append' 541 loginfo['op'] = 'append'
542 self.varhistory.record(**loginfo) 542 self.varhistory.record(**loginfo)
543 newvalue = (self.getVar(var, False) or "") + value 543 self.setVar(var + "_append", value, ignore=True, parsing=True)
544 self.setVar(var, newvalue, ignore=True)
545 544
546 def prependVar(self, var, value, **loginfo): 545 def prependVar(self, var, value, **loginfo):
547 loginfo['op'] = 'prepend' 546 loginfo['op'] = 'prepend'
548 self.varhistory.record(**loginfo) 547 self.varhistory.record(**loginfo)
549 newvalue = value + (self.getVar(var, False) or "") 548 self.setVar(var + "_prepend", value, ignore=True, parsing=True)
550 self.setVar(var, newvalue, ignore=True)
551 549
552 def delVar(self, var, **loginfo): 550 def delVar(self, var, **loginfo):
553 loginfo['detail'] = "" 551 loginfo['detail'] = ""