diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-09-18 13:15:51 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-22 12:19:44 +0100 |
commit | a05d474e5a0688ba80cab75d95e3c057c5db4f97 (patch) | |
tree | 3ae274d2e78e480497b319e9e32268f3fec6159f /bitbake/lib/bb/cooker.py | |
parent | 0c51d610e1bdb16ec96c29ec2b92de922f67b009 (diff) | |
download | poky-a05d474e5a0688ba80cab75d95e3c057c5db4f97.tar.gz |
bitbake: bitbake: cooker, command: add a command to return global data
Adding the 'getAllKeysWithFlags' read-only command that will
return a dump of the global data state, together with specified
flags for each key. The flag list is passed in as the first
parameter to the command.
This will be used by UI clients to get the build configuration.
(Bitbake rev: 3e094da513e1220319288806cb76ddf804772afd)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index fafa518911..ff2af69069 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1154,6 +1154,21 @@ class BBCooker: | |||
1154 | 1154 | ||
1155 | self.configuration.server_register_idlecallback(buildTargetsIdle, rq) | 1155 | self.configuration.server_register_idlecallback(buildTargetsIdle, rq) |
1156 | 1156 | ||
1157 | |||
1158 | def getAllKeysWithFlags(self, flaglist): | ||
1159 | dump = {} | ||
1160 | for k in self.data.keys(): | ||
1161 | try: | ||
1162 | v = self.data.getVar(k, True) | ||
1163 | if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart): | ||
1164 | dump[k] = { 'v' : v } | ||
1165 | for d in flaglist: | ||
1166 | dump[k][d] = self.data.getVarFlag(k, d) | ||
1167 | except Exception as e: | ||
1168 | print(e) | ||
1169 | return dump | ||
1170 | |||
1171 | |||
1157 | def generateNewImage(self, image, base_image, package_queue, timestamp, description): | 1172 | def generateNewImage(self, image, base_image, package_queue, timestamp, description): |
1158 | ''' | 1173 | ''' |
1159 | Create a new image with a "require"/"inherit" base_image statement | 1174 | Create a new image with a "require"/"inherit" base_image statement |