summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/command.py9
-rw-r--r--bitbake/lib/bb/cooker.py15
2 files changed, 24 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index f1abaf70d2..21a6de0f62 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -145,6 +145,15 @@ class CommandsSync:
145 """ 145 """
146 command.cooker.shutdown(True) 146 command.cooker.shutdown(True)
147 147
148 def getAllKeysWithFlags(self, command, params):
149 """
150 Returns a dump of the global state. Call with
151 variable flags to be retrieved as params.
152 """
153 flaglist = params[0]
154 return command.cooker.getAllKeysWithFlags(flaglist)
155 getAllKeysWithFlags.readonly = True
156
148 def getVariable(self, command, params): 157 def getVariable(self, command, params):
149 """ 158 """
150 Read the value of a variable from data 159 Read the value of a variable from data
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