diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-11-14 13:56:30 +0000 |
---|---|---|
committer | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-11-15 12:18:03 +0000 |
commit | 1182665de0da9a6e5fc77107f32a7fc1515029d0 (patch) | |
tree | 813be818732cef39f64815ca2a9cade8fd86dfb3 /bitbake/lib/toaster | |
parent | 6302d1baf516d5cff5d2b65cc734ca5098a26894 (diff) | |
download | poky-1182665de0da9a6e5fc77107f32a7fc1515029d0.tar.gz |
bitbake: cooker, toaster: variable definition trackingdora-toaster
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/toaster')
-rw-r--r-- | bitbake/lib/toaster/bldviewer/templates/configuration.html | 6 | ||||
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 6 |
2 files changed, 9 insertions, 3 deletions
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 |