diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-24 11:59:05 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-24 22:01:03 +0000 |
| commit | 25f1f4644d736108737846022231d21952e90d84 (patch) | |
| tree | 16e7903a4d813baa9b57be601278f9e908916875 | |
| parent | d53958766e2c766b95b3947f69b64c409ed433d8 (diff) | |
| download | poky-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>
| -rw-r--r-- | bitbake/lib/bb/tinfoil.py | 5 |
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 | |||
| 107 | class TinfoilCookerAdapter: | 112 | class 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, |
