summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/command.py12
-rw-r--r--bitbake/lib/bb/tinfoil.py4
2 files changed, 16 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]
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 796a98f053..27a341541a 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -52,6 +52,10 @@ class TinfoilDataStoreConnectorVarHistory:
52 def remoteCommand(self, cmd, *args, **kwargs): 52 def remoteCommand(self, cmd, *args, **kwargs):
53 return self.tinfoil.run_command('dataStoreConnectorVarHistCmd', self.dsindex, cmd, args, kwargs) 53 return self.tinfoil.run_command('dataStoreConnectorVarHistCmd', self.dsindex, cmd, args, kwargs)
54 54
55 def emit(self, var, oval, val, o, d):
56 ret = self.tinfoil.run_command('dataStoreConnectorVarHistCmdEmit', self.dsindex, var, oval, val, d.dsindex)
57 o.write(ret)
58
55 def __getattr__(self, name): 59 def __getattr__(self, name):
56 if not hasattr(bb.data_smart.VariableHistory, name): 60 if not hasattr(bb.data_smart.VariableHistory, name):
57 raise AttributeError("VariableHistory has no such method %s" % name) 61 raise AttributeError("VariableHistory has no such method %s" % name)