summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-11-14 13:56:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-15 11:48:53 +0000
commit9fdd8adc17dc732d3983afcaa30b63d69f483dad (patch)
tree9ce36e083236327ed1f15a52920cd2950de4dc3f /bitbake/lib/bb/cooker.py
parent51084379d43a6b6bbf828d2adaaccf803e9da081 (diff)
downloadpoky-9fdd8adc17dc732d3983afcaa30b63d69f483dad.tar.gz
bitbake: cooker, toaster: variable definition tracking
In order to track the file where a configuration variable was defined, this patch bring these changes: * a new feature is defined in CookerFeatures, named BASEDATASTORE_TRACKING. When a UI requests BASEDATASTORE_TRACKING, the base variable definition are tracked when configuration is parsed. * getAllKeysWithFlags now includes variable history in the data dump * toaster_ui.py will record the operation, file path and line number where the variable was changes * toaster Simple UI will display the file path and line number for Configuration page There is a change in the models to accomodate the recording of variable change history. [YOCTO #5227] (Bitbake rev: 78e58fed82f2a71f052485de0052d7b9cca53ffd) 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.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 267d19e3e2..524ba1182c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -81,7 +81,7 @@ class SkippedPackage:
81 81
82 82
83class CookerFeatures(object): 83class CookerFeatures(object):
84 _feature_list = [HOB_EXTRA_CACHES, SEND_DEPENDS_TREE] = range(2) 84 _feature_list = [HOB_EXTRA_CACHES, SEND_DEPENDS_TREE, BASEDATASTORE_TRACKING] = range(3)
85 85
86 def __init__(self): 86 def __init__(self):
87 self._features=set() 87 self._features=set()
@@ -177,6 +177,9 @@ class BBCooker:
177 self.data.disableTracking() 177 self.data.disableTracking()
178 178
179 def loadConfigurationData(self): 179 def loadConfigurationData(self):
180 if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
181 self.enableDataTracking()
182
180 self.initConfigurationData() 183 self.initConfigurationData()
181 self.databuilder.parseBaseConfiguration() 184 self.databuilder.parseBaseConfiguration()
182 self.data = self.databuilder.data 185 self.data = self.databuilder.data
@@ -189,6 +192,10 @@ class BBCooker:
189 bb.data.update_data(self.event_data) 192 bb.data.update_data(self.event_data)
190 bb.parse.init_parser(self.event_data) 193 bb.parse.init_parser(self.event_data)
191 194
195 if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
196 self.disableDataTracking()
197
198
192 def modifyConfigurationVar(self, var, val, default_file, op): 199 def modifyConfigurationVar(self, var, val, default_file, op):
193 if op == "append": 200 if op == "append":
194 self.appendConfigurationVar(var, val, default_file) 201 self.appendConfigurationVar(var, val, default_file)
@@ -320,7 +327,6 @@ class BBCooker:
320 open(confpath, 'w').close() 327 open(confpath, 'w').close()
321 328
322 def parseConfiguration(self): 329 def parseConfiguration(self):
323
324 # Set log file verbosity 330 # Set log file verbosity
325 verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", "0")) 331 verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", "0"))
326 if verboselogs: 332 if verboselogs:
@@ -1175,7 +1181,10 @@ class BBCooker:
1175 try: 1181 try:
1176 v = self.data.getVar(k, True) 1182 v = self.data.getVar(k, True)
1177 if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart): 1183 if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart):
1178 dump[k] = { 'v' : v } 1184 dump[k] = {
1185 'v' : v ,
1186 'history' : self.data.varhistory.variable(k),
1187 }
1179 for d in flaglist: 1188 for d in flaglist:
1180 dump[k][d] = self.data.getVarFlag(k, d) 1189 dump[k][d] = self.data.getVarFlag(k, d)
1181 except Exception as e: 1190 except Exception as e: