diff options
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 15 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 14 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/toaster/bldviewer/templates/configuration.html | 6 | ||||
| -rw-r--r-- | bitbake/lib/toaster/orm/models.py | 6 |
5 files changed, 32 insertions, 11 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 08af03a0f9..89410c297f 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -81,7 +81,7 @@ class SkippedPackage: | |||
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | class CookerFeatures(object): | 83 | class 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) |
| @@ -348,7 +355,6 @@ class BBCooker: | |||
| 348 | open(confpath, 'w').close() | 355 | open(confpath, 'w').close() |
| 349 | 356 | ||
| 350 | def parseConfiguration(self): | 357 | def parseConfiguration(self): |
| 351 | |||
| 352 | # Set log file verbosity | 358 | # Set log file verbosity |
| 353 | verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", "0")) | 359 | verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", "0")) |
| 354 | if verboselogs: | 360 | if verboselogs: |
| @@ -1203,7 +1209,10 @@ class BBCooker: | |||
| 1203 | try: | 1209 | try: |
| 1204 | v = self.data.getVar(k, True) | 1210 | v = self.data.getVar(k, True) |
| 1205 | if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart): | 1211 | if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart): |
| 1206 | dump[k] = { 'v' : v } | 1212 | dump[k] = { |
| 1213 | 'v' : v , | ||
| 1214 | 'history' : self.data.varhistory.variable(k), | ||
| 1215 | } | ||
| 1207 | for d in flaglist: | 1216 | for d in flaglist: |
| 1208 | dump[k][d] = self.data.getVarFlag(k, d) | 1217 | dump[k][d] = self.data.getVarFlag(k, d) |
| 1209 | except Exception as e: | 1218 | except Exception as e: |
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index c4131aebf0..170ee12a7e 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
| @@ -27,8 +27,10 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toaster.toastermain.settings") | |||
| 27 | 27 | ||
| 28 | import toaster.toastermain.settings as toaster_django_settings | 28 | import toaster.toastermain.settings as toaster_django_settings |
| 29 | from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage | 29 | from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage |
| 30 | from toaster.orm.models import Target_Package, Build_Package, Variable, Build_File | 30 | from toaster.orm.models import Variable, VariableHistory |
| 31 | from toaster.orm.models import Task_Dependency, Build_Package_Dependency, Target_Package_Dependency, Recipe_Dependency | 31 | from toaster.orm.models import Target_Package, Build_Package, Build_File |
| 32 | from toaster.orm.models import Task_Dependency, Build_Package_Dependency | ||
| 33 | from toaster.orm.models import Target_Package_Dependency, Recipe_Dependency | ||
| 32 | from bb.msg import BBLogFormatter as format | 34 | from bb.msg import BBLogFormatter as format |
| 33 | 35 | ||
| 34 | class ORMWrapper(object): | 36 | class ORMWrapper(object): |
| @@ -238,11 +240,15 @@ class ORMWrapper(object): | |||
| 238 | desc = vardump[root_var]['doc'] | 240 | desc = vardump[root_var]['doc'] |
| 239 | if desc is None: | 241 | if desc is None: |
| 240 | desc = '' | 242 | desc = '' |
| 241 | Variable.objects.create( build = build_obj, | 243 | variable_obj = Variable.objects.create( build = build_obj, |
| 242 | variable_name = k, | 244 | variable_name = k, |
| 243 | variable_value = value, | 245 | variable_value = value, |
| 244 | description = desc) | 246 | description = desc) |
| 245 | 247 | for vh in vardump[k]['history']: | |
| 248 | VariableHistory.objects.create( variable = variable_obj, | ||
| 249 | file_name = vh['file'], | ||
| 250 | line_number = vh['line'], | ||
| 251 | operation = vh['op']) | ||
| 246 | 252 | ||
| 247 | class BuildInfoHelper(object): | 253 | class BuildInfoHelper(object): |
| 248 | """ This class gathers the build information from the server and sends it | 254 | """ This class gathers the build information from the server and sends it |
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index 6c5b1529df..d2dba256c4 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py | |||
| @@ -41,7 +41,7 @@ import sys | |||
| 41 | import time | 41 | import time |
| 42 | import xmlrpclib | 42 | import xmlrpclib |
| 43 | 43 | ||
| 44 | featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE] | 44 | featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING] |
| 45 | 45 | ||
| 46 | logger = logging.getLogger("BitBake") | 46 | logger = logging.getLogger("BitBake") |
| 47 | interactive = sys.stdout.isatty() | 47 | interactive = sys.stdout.isatty() |
diff --git a/bitbake/lib/toaster/bldviewer/templates/configuration.html b/bitbake/lib/toaster/bldviewer/templates/configuration.html index 052c37c4e8..8db35e0d98 100644 --- a/bitbake/lib/toaster/bldviewer/templates/configuration.html +++ b/bitbake/lib/toaster/bldviewer/templates/configuration.html | |||
| @@ -5,16 +5,18 @@ | |||
| 5 | 5 | ||
| 6 | <tr> | 6 | <tr> |
| 7 | <th>Name</th> | 7 | <th>Name</th> |
| 8 | <th>Value</th> | ||
| 9 | <th>Description</th> | 8 | <th>Description</th> |
| 9 | <th>Definition history</th> | ||
| 10 | <th>Value</th> | ||
| 10 | </tr> | 11 | </tr> |
| 11 | 12 | ||
| 12 | {% for variable in configuration %} | 13 | {% for variable in configuration %} |
| 13 | 14 | ||
| 14 | <tr class="data"> | 15 | <tr class="data"> |
| 15 | <td>{{variable.variable_name}}</td> | 16 | <td>{{variable.variable_name}}</td> |
| 16 | <td>{{variable.variable_value}}</td> | ||
| 17 | <td>{% if variable.description %}{{variable.description}}{% endif %}</td> | 17 | <td>{% if variable.description %}{{variable.description}}{% endif %}</td> |
| 18 | <td>{% for vh in variable.variablehistory_set.all %}{{vh.operation}} in {{vh.file_name}}:{{vh.line_number}}<br/>{%endfor%}</td> | ||
| 19 | <td>{{variable.variable_value}}</td> | ||
| 18 | {% endfor %} | 20 | {% endfor %} |
| 19 | 21 | ||
| 20 | {% endblock %} | 22 | {% endblock %} |
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 1e82a65f43..cac8367960 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
| @@ -239,11 +239,15 @@ class Variable(models.Model): | |||
| 239 | build = models.ForeignKey(Build, related_name='variable_build') | 239 | build = models.ForeignKey(Build, related_name='variable_build') |
| 240 | variable_name = models.CharField(max_length=100) | 240 | variable_name = models.CharField(max_length=100) |
| 241 | variable_value = models.TextField(blank=True) | 241 | variable_value = models.TextField(blank=True) |
| 242 | file = models.FilePathField(max_length=255) | ||
| 243 | changed = models.BooleanField(default=False) | 242 | changed = models.BooleanField(default=False) |
| 244 | human_readable_name = models.CharField(max_length=200) | 243 | human_readable_name = models.CharField(max_length=200) |
| 245 | description = models.TextField(blank=True) | 244 | description = models.TextField(blank=True) |
| 246 | 245 | ||
| 246 | class VariableHistory(models.Model): | ||
| 247 | variable = models.ForeignKey(Variable) | ||
| 248 | file_name = models.FilePathField(max_length=255) | ||
| 249 | line_number = models.IntegerField(null=True) | ||
| 250 | operation = models.CharField(max_length=16) | ||
| 247 | 251 | ||
| 248 | class LogMessage(models.Model): | 252 | class LogMessage(models.Model): |
| 249 | INFO = 0 | 253 | INFO = 0 |
