summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/command.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-20 17:05:53 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-22 11:35:22 +0000
commit5b1807021e932b1150095f3d1744d8411a28a1f0 (patch)
treeb949a92af026dfb0334be4fa627c48920538fa42 /bitbake/lib/bb/command.py
parent99414bdb1c64f7f03e12c347cc16c43c2fa336b2 (diff)
downloadpoky-5b1807021e932b1150095f3d1744d8411a28a1f0.tar.gz
bitbake: data_smart: implement missing remote datastore operations
Enable the following operations from a remote datastore to affect the other end: * setVarFlag() * delVar() * delVarFlag() * renameVar() In practice I don't expect these to be used much, but they should be present so that the implementation is at least reasonably filled out and that the tests pass. Also add tests for the interface, mostly by subclassing the existing local test classes so that they are using a remote datastore. (These don't actually test remote usage via tinfoil, just that the datastore's interface can be used.) (Bitbake rev: 282dc0719d22a39df746eea762ebe05c66aa8f8a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/command.py')
-rw-r--r--bitbake/lib/bb/command.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 222a76e580..78a86ac4dc 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -505,6 +505,31 @@ class CommandsSync:
505 raise CommandError('dataStoreConnectorRelease: invalid index %d' % dsindex) 505 raise CommandError('dataStoreConnectorRelease: invalid index %d' % dsindex)
506 command.remotedatastores.release(dsindex) 506 command.remotedatastores.release(dsindex)
507 507
508 def dataStoreConnectorSetVarFlag(self, command, params):
509 dsindex = params[0]
510 name = params[1]
511 flag = params[2]
512 value = params[3]
513 datastore = command.remotedatastores[dsindex]
514 datastore.setVarFlag(name, flag, value)
515
516 def dataStoreConnectorDelVar(self, command, params):
517 dsindex = params[0]
518 name = params[1]
519 datastore = command.remotedatastores[dsindex]
520 if len(params) > 2:
521 flag = params[2]
522 datastore.delVarFlag(name, flag)
523 else:
524 datastore.delVar(name)
525
526 def dataStoreConnectorRenameVar(self, command, params):
527 dsindex = params[0]
528 name = params[1]
529 newname = params[2]
530 datastore = command.remotedatastores[dsindex]
531 datastore.renameVar(name, newname)
532
508 def parseRecipeFile(self, command, params): 533 def parseRecipeFile(self, command, params):
509 """ 534 """
510 Parse the specified recipe file (with or without bbappends) 535 Parse the specified recipe file (with or without bbappends)