summaryrefslogtreecommitdiffstats
path: root/lib/bb/tinfoil.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-20 17:05:52 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-21 21:01:56 +0000
commit4f9d6f060ed247fb6fa2f45668a892a1788d3f91 (patch)
tree79aee54d849ed2bbaab451ba17735531e47dbe59 /lib/bb/tinfoil.py
parent1ff9b3c669fa187f152de7b8b57d14c2468d926c (diff)
downloadbitbake-contrib-4f9d6f060ed247fb6fa2f45668a892a1788d3f91.tar.gz
tinfoil: fix override handling in remote datastores
There was a huge gap in the remote datastore code introduced in the tinfoil2 rework - we weren't handling overrides at all, since these are stored separately from the actual data in the DataSmart object. Thus, when a datastore actually represents a remote datastore we need to go back to that remote datastore to get the override data as well, so introduce code to do that. To avoid a second round-trip I had to modify the _findVar() function to return the override data as well. This will increase the overhead a little when that data is superfluous, but without making the function even uglier I don't think there's a way to avoid that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tinfoil.py')
-rw-r--r--lib/bb/tinfoil.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index 940f9ab0d..00cec59b8 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -60,12 +60,15 @@ class TinfoilDataStoreConnector:
self.dsindex = dsindex
def getVar(self, name):
value = self.tinfoil.run_command('dataStoreConnectorFindVar', self.dsindex, name)
+ overrides = None
if isinstance(value, dict):
if '_connector_origtype' in value:
value['_content'] = self.tinfoil._reconvert_type(value['_content'], value['_connector_origtype'])
del value['_connector_origtype']
-
- return value
+ if '_connector_overrides' in value:
+ overrides = value['_connector_overrides']
+ del value['_connector_overrides']
+ return value, overrides
def getKeys(self):
return set(self.tinfoil.run_command('dataStoreConnectorGetKeys', self.dsindex))
def getVarHistory(self, name):