summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-24 11:59:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-24 22:01:03 +0000
commit25f1f4644d736108737846022231d21952e90d84 (patch)
tree16e7903a4d813baa9b57be601278f9e908916875 /bitbake
parentd53958766e2c766b95b3947f69b64c409ed433d8 (diff)
downloadpoky-25f1f4644d736108737846022231d21952e90d84.tar.gz
bitbake: tinfoil: Add iterator support for DataStoreConnector
Some usages need to iterate the datastore. This is slow and not recommended but support this. (Bitbake rev: 38b4e330c6c2007e8ead878e1d9e9580d3b19c7b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/tinfoil.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 4fbad0774e..1164ee6014 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -104,6 +104,11 @@ class TinfoilDataStoreConnector:
104 setattr(self, name, newfunc) 104 setattr(self, name, newfunc)
105 return newfunc 105 return newfunc
106 106
107 def __iter__(self):
108 keys = self.tinfoil.run_command('dataStoreConnectorCmd', self.dsindex, "keys", [], {})
109 for k in keys:
110 yield k
111
107class TinfoilCookerAdapter: 112class TinfoilCookerAdapter:
108 """ 113 """
109 Provide an adapter for existing code that expects to access a cooker object via Tinfoil, 114 Provide an adapter for existing code that expects to access a cooker object via Tinfoil,