summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/command.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-16 15:45:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-18 11:38:22 +0100
commitd08d362cf98e9f3b6e99f4f9e33638e1fceffbaf (patch)
tree9f1000d312e26dd697e8e5a753932462f02cb290 /bitbake/lib/bb/command.py
parent46654e14a50c4c74512687df164fe014e9794055 (diff)
downloadpoky-d08d362cf98e9f3b6e99f4f9e33638e1fceffbaf.tar.gz
bitbake: tinfoil/data_smart: Allow variable history emit() to function remotely
We can't access the emit() function of varhistory currently as the datastore parameter isn't handled correctly, nor is the output stream. Add a custom wrapper for this function which handles the two details correctly. (Bitbake rev: ba0fa084ccd2b1ade96425d158fd31e49e42f286) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/command.py')
-rw-r--r--bitbake/lib/bb/command.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index dd77cdd6e2..f530cf844b 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -20,6 +20,7 @@ Commands are queued in a CommandQueue
20 20
21from collections import OrderedDict, defaultdict 21from collections import OrderedDict, defaultdict
22 22
23import io
23import bb.event 24import bb.event
24import bb.cooker 25import bb.cooker
25import bb.remotedata 26import bb.remotedata
@@ -500,6 +501,17 @@ class CommandsSync:
500 d = command.remotedatastores[dsindex].varhistory 501 d = command.remotedatastores[dsindex].varhistory
501 return getattr(d, method)(*args, **kwargs) 502 return getattr(d, method)(*args, **kwargs)
502 503
504 def dataStoreConnectorVarHistCmdEmit(self, command, params):
505 dsindex = params[0]
506 var = params[1]
507 oval = params[2]
508 val = params[3]
509 d = command.remotedatastores[params[4]]
510
511 o = io.StringIO()
512 command.remotedatastores[dsindex].varhistory.emit(var, oval, val, o, d)
513 return o.getvalue()
514
503 def dataStoreConnectorIncHistCmd(self, command, params): 515 def dataStoreConnectorIncHistCmd(self, command, params):
504 dsindex = params[0] 516 dsindex = params[0]
505 method = params[1] 517 method = params[1]