diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-12-13 20:07:09 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-14 12:25:07 +0000 |
commit | 8f8a9ef66930ef8375050e80c751dab5ba024d83 (patch) | |
tree | 5aff939bf2af2f18a1c07c24315ae57c99720d9b /bitbake/lib/bb/tinfoil.py | |
parent | f1f3a112a02aef2e7094b4700c9a7d341ee01275 (diff) | |
download | poky-8f8a9ef66930ef8375050e80c751dab5ba024d83.tar.gz |
bitbake: tinfoil: pass datastore to server when expanding python references
If you're expanding a value that refers to the value of a variable in
python code, we need to ensure that the datastore that gets used to get
the value of that variable is the client-side datastore and not just the
part of it that's on the server side. For example, suppose you are in
client code doing the following:
d.setVar('HELLO', 'there')
result = d.expand('${@d.getVar("HELLO", True)}')
result should be "there" but if the client part wasn't taken into
account, it would be whatever value HELLO had in the server portion of
the datastore (if any).
(Bitbake rev: cbc22a0a9aadc8606b927dbac0f1407ec2736b35)
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.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index c551a9f1f7..720bf4b931 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -29,6 +29,7 @@ import bb.providers | |||
29 | import bb.taskdata | 29 | import bb.taskdata |
30 | import bb.utils | 30 | import bb.utils |
31 | import bb.command | 31 | import bb.command |
32 | import bb.remotedata | ||
32 | from bb.cookerdata import CookerConfiguration, ConfigParameters | 33 | from bb.cookerdata import CookerConfiguration, ConfigParameters |
33 | from bb.main import setup_bitbake, BitBakeConfigParameters, BBMainException | 34 | from bb.main import setup_bitbake, BitBakeConfigParameters, BBMainException |
34 | import bb.fetch2 | 35 | import bb.fetch2 |
@@ -69,8 +70,9 @@ class TinfoilDataStoreConnector: | |||
69 | return set(self.tinfoil.run_command('dataStoreConnectorGetKeys', self.dsindex)) | 70 | return set(self.tinfoil.run_command('dataStoreConnectorGetKeys', self.dsindex)) |
70 | def getVarHistory(self, name): | 71 | def getVarHistory(self, name): |
71 | return self.tinfoil.run_command('dataStoreConnectorGetVarHistory', self.dsindex, name) | 72 | return self.tinfoil.run_command('dataStoreConnectorGetVarHistory', self.dsindex, name) |
72 | def expandPythonRef(self, varname, expr): | 73 | def expandPythonRef(self, varname, expr, d): |
73 | ret = self.tinfoil.run_command('dataStoreConnectorExpandPythonRef', self.dsindex, varname, expr) | 74 | ds = bb.remotedata.RemoteDatastores.transmit_datastore(d) |
75 | ret = self.tinfoil.run_command('dataStoreConnectorExpandPythonRef', ds, varname, expr) | ||
74 | return ret | 76 | return ret |
75 | def setVar(self, varname, value): | 77 | def setVar(self, varname, value): |
76 | if self.dsindex is None: | 78 | if self.dsindex is None: |