diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/command.py | 12 | ||||
-rw-r--r-- | bitbake/lib/bb/tinfoil.py | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 98c945edb5..b8429b2773 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 | ||
21 | from collections import OrderedDict, defaultdict | 21 | from collections import OrderedDict, defaultdict |
22 | 22 | ||
23 | import io | ||
23 | import bb.event | 24 | import bb.event |
24 | import bb.cooker | 25 | import bb.cooker |
25 | import bb.remotedata | 26 | import bb.remotedata |
@@ -478,6 +479,17 @@ class CommandsSync: | |||
478 | d = command.remotedatastores[dsindex].varhistory | 479 | d = command.remotedatastores[dsindex].varhistory |
479 | return getattr(d, method)(*args, **kwargs) | 480 | return getattr(d, method)(*args, **kwargs) |
480 | 481 | ||
482 | def dataStoreConnectorVarHistCmdEmit(self, command, params): | ||
483 | dsindex = params[0] | ||
484 | var = params[1] | ||
485 | oval = params[2] | ||
486 | val = params[3] | ||
487 | d = command.remotedatastores[params[4]] | ||
488 | |||
489 | o = io.StringIO() | ||
490 | command.remotedatastores[dsindex].varhistory.emit(var, oval, val, o, d) | ||
491 | return o.getvalue() | ||
492 | |||
481 | def dataStoreConnectorIncHistCmd(self, command, params): | 493 | def dataStoreConnectorIncHistCmd(self, command, params): |
482 | dsindex = params[0] | 494 | dsindex = params[0] |
483 | method = params[1] | 495 | method = params[1] |
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 28f1e5623f..8bec8cbaf6 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -53,6 +53,10 @@ class TinfoilDataStoreConnectorVarHistory: | |||
53 | def remoteCommand(self, cmd, *args, **kwargs): | 53 | def remoteCommand(self, cmd, *args, **kwargs): |
54 | return self.tinfoil.run_command('dataStoreConnectorVarHistCmd', self.dsindex, cmd, args, kwargs) | 54 | return self.tinfoil.run_command('dataStoreConnectorVarHistCmd', self.dsindex, cmd, args, kwargs) |
55 | 55 | ||
56 | def emit(self, var, oval, val, o, d): | ||
57 | ret = self.tinfoil.run_command('dataStoreConnectorVarHistCmdEmit', self.dsindex, var, oval, val, d.dsindex) | ||
58 | o.write(ret) | ||
59 | |||
56 | def __getattr__(self, name): | 60 | def __getattr__(self, name): |
57 | if not hasattr(bb.data_smart.VariableHistory, name): | 61 | if not hasattr(bb.data_smart.VariableHistory, name): |
58 | raise AttributeError("VariableHistory has no such method %s" % name) | 62 | raise AttributeError("VariableHistory has no such method %s" % name) |