From 25f1f4644d736108737846022231d21952e90d84 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 24 Mar 2020 11:59:05 +0000 Subject: 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 --- bitbake/lib/bb/tinfoil.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bitbake') 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: setattr(self, name, newfunc) return newfunc + def __iter__(self): + keys = self.tinfoil.run_command('dataStoreConnectorCmd', self.dsindex, "keys", [], {}) + for k in keys: + yield k + class TinfoilCookerAdapter: """ Provide an adapter for existing code that expects to access a cooker object via Tinfoil, -- cgit v1.2.3-54-g00ecf