summaryrefslogtreecommitdiffstats
path: root/bitbake/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-22 11:35:22 +0000
commit99414bdb1c64f7f03e12c347cc16c43c2fa336b2 (patch)
treeed87faa1728cd3731a846b278269281e348c401b /bitbake/lib/bb/tinfoil.py
parent0cb6f853357f26962748ab1a21490e7d4af53af0 (diff)
downloadpoky-99414bdb1c64f7f03e12c347cc16c43c2fa336b2.tar.gz
bitbake: 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. (Bitbake rev: 4f9d6f060ed247fb6fa2f45668a892a1788d3f91) 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/tinfoil.py')
-rw-r--r--bitbake/lib/bb/tinfoil.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 940f9ab0d5..00cec59b83 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -60,12 +60,15 @@ class TinfoilDataStoreConnector:
60 self.dsindex = dsindex 60 self.dsindex = dsindex
61 def getVar(self, name): 61 def getVar(self, name):
62 value = self.tinfoil.run_command('dataStoreConnectorFindVar', self.dsindex, name) 62 value = self.tinfoil.run_command('dataStoreConnectorFindVar', self.dsindex, name)
63 overrides = None
63 if isinstance(value, dict): 64 if isinstance(value, dict):
64 if '_connector_origtype' in value: 65 if '_connector_origtype' in value:
65 value['_content'] = self.tinfoil._reconvert_type(value['_content'], value['_connector_origtype']) 66 value['_content'] = self.tinfoil._reconvert_type(value['_content'], value['_connector_origtype'])
66 del value['_connector_origtype'] 67 del value['_connector_origtype']
67 68 if '_connector_overrides' in value:
68 return value 69 overrides = value['_connector_overrides']
70 del value['_connector_overrides']
71 return value, overrides
69 def getKeys(self): 72 def getKeys(self):
70 return set(self.tinfoil.run_command('dataStoreConnectorGetKeys', self.dsindex)) 73 return set(self.tinfoil.run_command('dataStoreConnectorGetKeys', self.dsindex))
71 def getVarHistory(self, name): 74 def getVarHistory(self, name):