toaster: sort outcome and sstate columns by string value
PATCH 1/5 toaster: sort outcome and sstate columns by string value
From: David Reyna <[email protected]>
Sort the 'outcome' and 'sstate_result' columns by their description string values and not their numerical values.
[YOCTO #5921]
--- lib/toaster/orm/models.py | 12 ++++++++++++ lib/toaster/toastergui/views.py | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-)
lib/toaster/orm/models.py +12 -0
@@ -166,9 +166,18 @@ class Task(models.Model): def get_related_setscene(self): return Task.objects.related_setscene(self) + def get_outcome_text(self): + return Task.TASK_OUTCOME[self.outcome + 1][1] + def get_outcome_help(self): return Task.TASK_OUTCOME_HELP[self.outcome][1] + def get_sstate_text(self): + if self.sstate_result==Task.SSTATE_NA: + return '' + else: + return Task.SSTATE_RESULT[self.sstate_result][1] + def get_executed_display(self): if self.task_executed: return "Executed"
@@ -200,6 +209,9 @@ class Task(models.Model): message = models.CharField(max_length=240) logfile = models.FilePathField(max_length=255, blank=True) + outcome_text = property(get_outcome_text) + sstate_text = property(get_sstate_text) + class Meta: ordering = ('order', 'recipe' ,) unique_together = ('build', 'recipe', 'task_name', )
lib/toaster/toastergui/views.py +8 -1
@@ -853,7 +853,14 @@ def tasks_common(request, build_id, variant, task_anchor): (filter_string, search_term, ordering_string) = _search_tuple(request, Task) queryset_all = Task.objects.filter(build=build_id).exclude(order__isnull=True).exclude(outcome=Task.OUTCOME_NA) queryset_with_search = _get_queryset(Task, queryset_all, None , search_term, ordering_string, 'order') - queryset = _get_queryset(Task, queryset_all, filter_string, search_term, ordering_string, 'order') + if ordering_string.startswith('outcome'): + queryset = _get_queryset(Task, queryset_all, filter_string, search_term, 'order:+', 'order') + queryset = sorted(queryset, key=lambda ur: (ur.outcome_text), reverse=ordering_string.endswith('-')) + elif ordering_string.startswith('sstate_result'): + queryset = _get_queryset(Task, queryset_all, filter_string, search_term, 'order:+', 'order') + queryset = sorted(queryset, key=lambda ur: (ur.sstate_text), reverse=ordering_string.endswith('-')) + else: + queryset = _get_queryset(Task, queryset_all, filter_string, search_term, ordering_string, 'order') # compute the anchor's page if anchor:
Signature · 1 line
1.9.1
PATCH 2/5 toaster: Make sure layer branch only shows when not empty
From: Belen Barros Pena <[email protected]>
In the recipe details and package details pages, the layer branch definition list elements should only show when the branch field in the database is populated. If the branch field is empty, we don't show them.
The patch also removes all unnecessary data-toggle and data-original-title attributes.
[YP #6152]
--- lib/toaster/toastergui/templates/dirinfo.html | 4 ++-- .../templates/package_built_dependencies.html | 4 ++-- .../toastergui/templates/package_built_detail.html | 4 ++-- .../toastergui/templates/package_detail_base.html | 21 +++++++++++---------- .../templates/package_included_tabs.html | 4 ++-- lib/toaster/toastergui/templates/recipe.html | 22 ++++++++++++---------- lib/toaster/toastergui/templates/target.html | 4 ++-- lib/toaster/toastergui/templates/task.html | 2 +- lib/toaster/toastergui/templates/tasks.html | 2 +- 9 files changed, 35 insertions(+), 32 deletions(-)
lib/toaster/toastergui/templates/dirinfo.html +2 -2
@@ -189,13 +189,13 @@ <ul class="nav nav-pills"> <li class=""> <a href="{% url 'target' build.id target.id %}"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Of all the packages built, the subset installed in the root file system of this image"></i> + <i class="icon-question-sign get-help" title="Of all the packages built, the subset installed in the root file system of this image"></i> Packages included ({{target.package_count}} - {{packages_sum|filtered_filesizeformat}}) </a> </li> <li class="active"> <a href="{% url 'dirinfo' build.id target.id %}"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The directories and files in the root file system of this image"></i> + <i class="icon-question-sign get-help" title="The directories and files in the root file system of this image"></i> Directory structure </a> </li>
lib/toaster/toastergui/templates/package_built_dependencies.html +2 -2
@@ -5,13 +5,13 @@ <ul class="nav nav-pills"> <li class=""> <a href="{% url 'package_built_detail' build.id package.id %}"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Shows the files produced by this package."></i> + <i class="icon-question-sign get-help" title="Shows the files produced by this package."></i> Generated files ({{package.buildfilelist_package.count}}) </a> </li> <li class="active"> <a href="{% url 'package_built_dependencies' build.id package.id %}"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Shows the runtime packages required by this package."></i> + <i class="icon-question-sign get-help" title="Shows the runtime packages required by this package."></i> Runtime dependencies ({{dependency_count}}) </a> </li>
lib/toaster/toastergui/templates/package_built_detail.html +2 -2
@@ -8,11 +8,11 @@ {# Not included case #} <ul class="nav nav-pills"> <li class="active"> <a href="#"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Files added to a root file system when you include {{package.name}} in an image"></i> + <i class="icon-question-sign get-help" title="Files added to a root file system when you include {{package.name}} in an image"></i> Generated files ({{packageFileCount}}) </a></li> <li class=""><a href="{% url 'package_built_dependencies' build.id package.id %}"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Projected runtime dependencies when you include {{package.name}} in an image"></i> + <i class="icon-question-sign get-help" title="Projected runtime dependencies when you include {{package.name}} in an image"></i> Runtime dependencies ({{dependency_count}}) </a></li> </ul>
lib/toaster/toastergui/templates/package_detail_base.html +11 -10
@@ -57,7 +57,7 @@ <dl> <dt> Size - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The size of the package"></i> + <i class="icon-question-sign get-help" title="The size of the package"></i> </dt> <dd> {% comment %}
@@ -74,7 +74,7 @@ <dt> License - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The license under which this package is distributed"></i> + <i class="icon-question-sign get-help" title="The license under which this package is distributed"></i> </dt> <dd>{{package.license}}</dd>
@@ -83,14 +83,14 @@ # problemse are resolved. <dt> License files - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Path to the license files that apply to the package"></i> + <i class="icon-question-sign get-help" title="Path to the license files that apply to the package"></i> </dt> <dd></dd> {% endcomment %} <dt> Recipe - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The name of the recipe building this package"></i> + <i class="icon-question-sign get-help" title="The name of the recipe building this package"></i> </dt> <dd> {% if package.recipe_id > 0 %}
@@ -102,13 +102,13 @@ <dt> Recipe version - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The version of the recipe building this package"></i> + <i class="icon-question-sign get-help" title="The version of the recipe building this package"></i> </dt> <dd>{{package.recipe.version}}</dd> <dt> Layer - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The name of the layer providing the recipe that builds this package"></i> + <i class="icon-question-sign get-help" title="The name of the layer providing the recipe that builds this package"></i> </dt> <dd> {{package.recipe.layer_version.layer.name}}
@@ -122,21 +122,22 @@ {% endcomment %} {% endif %} </dd> - + {% if package.recipe.layer_version.branch %} <dt> Layer branch - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The Git branch of the layer providing the recipe that builds this package"></i> + <i class="icon-question-sign get-help" title="The Git branch of the layer providing the recipe that builds this package"></i> </dt> <dd>{{package.recipe.layer_version.branch}}</dd> + {% endif %} <dt> Layer commit - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The Git commit of the layer providing the recipe that builds this package"></i> + <i class="icon-question-sign get-help" title="The Git commit of the layer providing the recipe that builds this package"></i> </dt> <dd class="iscommit">{{package.recipe.layer_version.commit}}</dd> <dt> Layer directory - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Path to the layer providing the recipe that builds this package"></i> + <i class="icon-question-sign get-help" title="Path to the layer providing the recipe that builds this package"></i> </dt> <dd><code>{{package.recipe.layer_version.layer.local_path}}</code></dd> </dl>
lib/toaster/toastergui/templates/package_included_tabs.html +2 -2
@@ -16,7 +16,7 @@ <li class=""> {% endif %} <a href="{% url 'package_included_dependencies' build.id target.id package.id %}"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Package runtime dependencies"></i> + <i class="icon-question-sign get-help" title="Package runtime dependencies"></i> Runtime dependencies ({{dependency_count}}) </a> </li>
@@ -26,7 +26,7 @@ <li class=""> {% endif %} <a href="{% url 'package_included_reverse_dependencies' build.id target.id package.id %}"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The package runtime reverse dependencies (i.e. the packages in this image that depend on this package). Reverse dependencies reflect only the 'depends' dependency type"></i> + <i class="icon-question-sign get-help" title="The package runtime reverse dependencies (i.e. the packages in this image that depend on this package). Reverse dependencies reflect only the 'depends' dependency type"></i> Reverse runtime dependencies ({{reverse_count}}) </a> </li>
lib/toaster/toastergui/templates/recipe.html +12 -10
@@ -21,25 +21,25 @@ <ul class="nav nav-pills"> <li class="active"> <a href="#information" data-toggle="tab"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Build-related information about the recipe"></i> + <i class="icon-question-sign get-help" title="Build-related information about the recipe"></i> Recipe details </a> </li> <li> <a href="#packages-built" data-toggle="tab"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The packaged output resulting from building the recipe"></i> + <i class="icon-question-sign get-help" title="The packaged output resulting from building the recipe"></i> Packages ({{packages.count}}) </a> </li> <li> <a href="#dependencies" data-toggle="tab"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The recipe build-time dependencies (i.e. other recipes)"></i> + <i class="icon-question-sign get-help" title="The recipe build-time dependencies (i.e. other recipes)"></i> Build dependencies ({{object.r_dependencies_recipe.all.count}}) </a> </li> <li> <a href="#brought-in-by" data-toggle="tab"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The recipe build-time reverse dependencies (i.e. the recipes that depend on this recipe)"></i> + <i class="icon-question-sign get-help" title="The recipe build-time reverse dependencies (i.e. the recipes that depend on this recipe)"></i> Reverse build dependencies ({{object.r_dependencies_depends.all.count}}) </a> </li>
@@ -48,27 +48,29 @@ <div class="tab-pane active" id="information" name="information"> <dl class="dl-horizontal"> <dt> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The name of the layer providing the recipe"></i> + <i class="icon-question-sign get-help" title="The name of the layer providing the recipe"></i> Layer </dt> <dd>{{layer.name}}</dd> <dt> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Path to the layer providing the recipe"></i> + <i class="icon-question-sign get-help" title="Path to the layer providing the recipe"></i> Layer directory </dt> <dd><code>{{layer.local_path}}</code></dd> <dt> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Path to the recipe .bb file"></i> + <i class="icon-question-sign get-help" title="Path to the recipe .bb file"></i> Recipe file </dt> <dd><code>{{object.file_path}}</code></dd> + {% if layer_version.branch %} <dt> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The Git branch of the layer providing the recipe"></i> + <i class="icon-question-sign get-help" title="The Git branch of the layer providing the recipe"></i> Layer branch </dt> <dd>{{layer_version.branch}}</dd> + {% endif %} <dt> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The Git commit of the layer providing the recipe"></i> + <i class="icon-question-sign get-help" title="The Git commit of the layer providing the recipe"></i> Layer commit </dt> <dd class="iscommit">{{layer_version.commit}}</dd>
@@ -259,7 +261,7 @@ {% if object.section %} <dt> Section - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The section in which recipes should be categorized"></i> + <i class="icon-question-sign get-help" title="The section in which recipes should be categorized"></i> </dt> <dd>{{object.section}}</dd> {% endif %}
lib/toaster/toastergui/templates/target.html +2 -2
@@ -35,13 +35,13 @@ <ul class="nav nav-pills"> <li class="active"> <a href="#target"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="Of all the packages built, the subset installed in the root file system of this image"></i> + <i class="icon-question-sign get-help" title="Of all the packages built, the subset installed in the root file system of this image"></i> Packages included ({{target.package_count}} - {{packages_sum|filtered_filesizeformat}}) </a> </li> <li> <a href="{% url 'dirinfo' build.id target.id %}"> - <i class="icon-question-sign get-help" data-toggle="tooltip" title="The directories and files in the root file system of this image"></i> + <i class="icon-question-sign get-help" title="The directories and files in the root file system of this image"></i> Directory structure </a> </li>
lib/toaster/toastergui/templates/task.html +1 -1
@@ -46,7 +46,7 @@ {# not executed tasks outcome #} {% if task.outcome == task.OUTCOME_PREBUILT %} {% if not showing_matches %} - <a class="btn" href="javascript:reload_params({'show_matches' : 'true' })">Match to tasks in previous builds <i class="icon-question-sign get-help" style="margin-top:20px;" data-toggle="tooltip" title="This shows you a list of tasks from previous builds with the same signature generated from the same inputs as used in the prebuilt task. Any of them could be the task that generated the output this prebuilt task is reusing"></i></a> + <a class="btn" href="javascript:reload_params({'show_matches' : 'true' })">Match to tasks in previous builds <i class="icon-question-sign get-help" style="margin-top:20px;" title="This shows you a list of tasks from previous builds with the same signature generated from the same inputs as used in the prebuilt task. Any of them could be the task that generated the output this prebuilt task is reusing"></i></a> {% elif matching_tasks %} <h3 class="details">Prebuilt task could be based on <i class="icon-question-sign get-help heading-help" title="This table shows a list of tasks from previous builds with the same signature generated from the same inputs as used in the prebuilt task. Any of them could be the task that generated the output this prebuilt task is reusing"></i>
lib/toaster/toastergui/templates/tasks.html +1 -1
@@ -86,7 +86,7 @@ <a href="{% url "recipe" build.pk task.recipe.pk %}">{{task.recipe.version}}</a> </td> <td class="task_name"> - <a href="{%url "task" build.pk task.pk%} ">{{task.task_name}}</a> {% if task.get_description %}<i class="icon-question-sign get-help hover-help" title="" data-original-title="{{task.get_description}}"></i> {% endif %} + <a href="{%url "task" build.pk task.pk%} ">{{task.task_name}}</a> {% if task.get_description %}<i class="icon-question-sign get-help hover-help" title="{{task.get_description}}"></i> {% endif %} </td> <td class="executed"> <a href="{%url "task" build.pk task.pk%} ">{{task.get_executed_display}}</a>
Signature · 1 line
1.9.1
PATCH 3/5 toaster: fix span2 headings for packages
In reply to Alex DAMIANFrom: Dave Lerner <[email protected]>
[YOCTO 6147]
Fix bug in views.py that put 'span2' class id in a 'clclass' key instead of the 'dclass' key. This fix exposed another problem in target.html and the target view function that used 'package_size' instead of 'size' as the 'clclass' which is inconsistent with the model field name, causing table data columns to be shown when the header is hidden.
--- lib/toaster/toastergui/templates/target.html | 2 +- lib/toaster/toastergui/views.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-)
lib/toaster/toastergui/templates/target.html +1 -1
@@ -79,7 +79,7 @@ {{package.version|filtered_packageversion:package.revision}} </a> </td> - <td class="package-size sizecol"> + <td class="size sizecol"> {{package.size|filtered_installedsize:package.installed_size|filtered_filesizeformat}} </td> <td class="size_over_total sizecol">
lib/toaster/toastergui/views.py +6 -3
@@ -575,13 +575,15 @@ def target(request, build_id, target_id): 'qhelp':'The size of the package', 'orderfield': _get_toggle_order(request, "size", True), 'ordericon':_get_toggle_order_icon(request, "size"), - 'clclass': 'package_size span2', + 'clclass': 'size', + 'dclass' : 'span2', 'hidden' : 0, }, { 'name':'Size over total (%)', 'qhelp':'Proportion of the overall included package size represented by this package', - 'clclass': 'size_over_total span2', + 'clclass': 'size_over_total', + 'dclass' : 'span2', 'hidden' : 1, }, {
@@ -1273,7 +1275,8 @@ def bpackage(request, build_id): 'qhelp':'The size of the package', 'orderfield': _get_toggle_order(request, "size", True), 'ordericon':_get_toggle_order_icon(request, "size"), - 'clclass': 'size span2', 'hidden': 0, + 'clclass': 'size', 'hidden': 0, + 'dclass' : 'span2', }, { 'name':'License',
Signature · 1 line
1.9.1
PATCH 4/5 toaster: fix migration code for MySQL
In reply to Alex DAMIANFrom: Alexandru DAMIAN <[email protected]>
This is a patch that fixes the 0004, 0005 migrations of the toaster model to get them to properly work with MySQL.
These migrations had a conflict around Build.timespent field. The sqlite3 constraits were not enough to detect the conflict, and the migrations worked as expected.
MySQL objected to adding the field twice, so I did regenerate the migrations with the correct model listing. The net effect is the same, so the migrations work the same, but now we can use these two migration on the MySQL and other more advanced SQL engines.
--- .../0004_auto__add_field_package_installed_name.py | 1 + ...e__add_target_file__add_field_variablehistor.py | 56 +++++++--------------- 2 files changed, 19 insertions(+), 38 deletions(-)
lib/toaster/orm/migrations/0004_auto__add_field_package_installed_name.py +1 -0
@@ -34,6 +34,7 @@ class Migration(SchemaMigration): 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 'started_on': ('django.db.models.fields.DateTimeField', [], {}), + 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}) }, u'orm.layer': {
lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py +18 -38
98 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 5/5 toaster: modify SQL data type constraints
In reply to Alex DAMIANFrom: Alexandru DAMIAN <[email protected]>
This patch modifies the data type constraints for the SQL fields.
The original constraints have been based on guess worked, and they weren't strictly enforced for sqlite. On MySQL, the constraints are strictly enforced, and need to match the real data that we have.
After measuring data on sample builds, the new constraints have been validated to work with MySQL, and this patch updates the database schema with the new field types / constraints.
--- ...story_operation__chg_field_recipe_descriptio.py | 225 +++++++++++++++++++++ lib/toaster/orm/models.py | 8 +- 2 files changed, 229 insertions(+), 4 deletions(-) create mode 100644 lib/toaster/orm/migrations/0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descriptio.py
lib/toaster/orm/migrations/0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descriptio.py new file +225 -0
@@ -0,0 +1,225 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Changing field 'VariableHistory.operation' + db.alter_column(u'orm_variablehistory', 'operation', self.gf('django.db.models.fields.CharField')(max_length=64)) + + # Changing field 'Recipe.description' + db.alter_column(u'orm_recipe', 'description', self.gf('django.db.models.fields.TextField')()) + + # Changing field 'Target_Image_File.file_name' + db.alter_column(u'orm_target_image_file', 'file_name', self.gf('django.db.models.fields.FilePathField')(max_length=254)) + + # Changing field 'Package.description' + db.alter_column(u'orm_package', 'description', self.gf('django.db.models.fields.TextField')()) + + def backwards(self, orm): + + # Changing field 'VariableHistory.operation' + db.alter_column(u'orm_variablehistory', 'operation', self.gf('django.db.models.fields.CharField')(max_length=16)) + + # Changing field 'Recipe.description' + db.alter_column(u'orm_recipe', 'description', self.gf('django.db.models.fields.CharField')(max_length=100)) + + # Changing field 'Target_Image_File.file_name' + db.alter_column(u'orm_target_image_file', 'file_name', self.gf('django.db.models.fields.FilePathField')(max_length=100)) + + # Changing field 'Package.description' + db.alter_column(u'orm_package', 'description', self.gf('django.db.models.fields.CharField')(max_length=200)) + + models = { + u'orm.build': { + 'Meta': {'object_name': 'Build'}, + 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'completed_on': ('django.db.models.fields.DateTimeField', [], {}), + 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}), + 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}), + 'started_on': ('django.db.models.fields.DateTimeField', [], {}), + 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}) + }, + u'orm.helptext': { + 'Meta': {'object_name': 'HelpText'}, + 'area': ('django.db.models.fields.IntegerField', [], {}), + 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'text': ('django.db.models.fields.TextField', [], {}) + }, + u'orm.layer': { + 'Meta': {'object_name': 'Layer'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), + 'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'orm.layer_version': { + 'Meta': {'object_name': 'Layer_Version'}, + 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}), + 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}), + 'priority': ('django.db.models.fields.IntegerField', [], {}) + }, + u'orm.logmessage': { + 'Meta': {'object_name': 'LogMessage'}, + 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), + 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}), + 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}), + 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'}) + }, + u'orm.package': { + 'Meta': {'object_name': 'Package'}, + 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}), + 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}), + 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}), + 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}), + 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}), + 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}) + }, + u'orm.package_dependency': { + 'Meta': {'object_name': 'Package_Dependency'}, + 'dep_type': ('django.db.models.fields.IntegerField', [], {}), + 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}), + 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'}) + }, + u'orm.package_file': { + 'Meta': {'object_name': 'Package_File'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}), + 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}), + 'size': ('django.db.models.fields.IntegerField', [], {}) + }, + u'orm.recipe': { + 'Meta': {'object_name': 'Recipe'}, + 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}), + 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}), + 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}) + }, + u'orm.recipe_dependency': { + 'Meta': {'object_name': 'Recipe_Dependency'}, + 'dep_type': ('django.db.models.fields.IntegerField', [], {}), + 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"}) + }, + u'orm.target': { + 'Meta': {'object_name': 'Target'}, + 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}), + 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'orm.target_file': { + 'Meta': {'object_name': 'Target_File'}, + 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}), + 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'inodetype': ('django.db.models.fields.IntegerField', [], {}), + 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}), + 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'size': ('django.db.models.fields.IntegerField', [], {}), + 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}), + 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"}) + }, + u'orm.target_image_file': { + 'Meta': {'object_name': 'Target_Image_File'}, + 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}), + 'file_size': ('django.db.models.fields.IntegerField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"}) + }, + u'orm.target_installed_package': { + 'Meta': {'object_name': 'Target_Installed_Package'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}), + 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"}) + }, + u'orm.task': { + 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'}, + 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}), + 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}), + 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), + 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}), + 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}), + 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), + 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), + 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}), + 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}), + 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}), + 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}) + }, + u'orm.task_dependency': { + 'Meta': {'object_name': 'Task_Dependency'}, + 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"}) + }, + u'orm.variable': { + 'Meta': {'object_name': 'Variable'}, + 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}), + 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'}) + }, + u'orm.variablehistory': { + 'Meta': {'object_name': 'VariableHistory'}, + 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), + 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}), + 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"}) + } + } + + complete_apps = ['orm']
lib/toaster/orm/models.py +4 -4
@@ -72,7 +72,7 @@ class Target(models.Model): class Target_Image_File(models.Model): target = models.ForeignKey(Target) - file_name = models.FilePathField(max_length=100) + file_name = models.FilePathField(max_length=254) file_size = models.IntegerField() class Target_File(models.Model):
@@ -230,7 +230,7 @@ class Package(models.Model): version = models.CharField(max_length=100, blank=True) revision = models.CharField(max_length=32, blank=True) summary = models.CharField(max_length=200, blank=True) - description = models.CharField(max_length=200, blank=True) + description = models.TextField(blank=True) size = models.IntegerField(default=0) installed_size = models.IntegerField(default=0) section = models.CharField(max_length=80, blank=True)
@@ -298,7 +298,7 @@ class Recipe(models.Model): version = models.CharField(max_length=100, blank=True) layer_version = models.ForeignKey('Layer_Version', related_name='recipe_layer_version') summary = models.CharField(max_length=100, blank=True) - description = models.CharField(max_length=100, blank=True) + description = models.TextField(blank=True) section = models.CharField(max_length=100, blank=True) license = models.CharField(max_length=200, blank=True) homepage = models.URLField(blank=True)
@@ -353,7 +353,7 @@ class VariableHistory(models.Model): value = models.TextField(blank=True) file_name = models.FilePathField(max_length=255) line_number = models.IntegerField(null=True) - operation = models.CharField(max_length=16) + operation = models.CharField(max_length=64) class HelpText(models.Model): VARIABLE = 0
Signature · 1 line
1.9.1
cover toaster changeset pull request
From: Alexandru DAMIAN <[email protected]>
Hello,
Can you please pull this changeset for Toaster ?
All patches have been reviewed on the toaster mailinglist.
Thank you,
Alex
The following changes since commit 13beb6c9f92c0b3d56fc9aa06eb2259fb8390949:
setup.py: fix documentation build (2014-05-07 10:30:26 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib adamian/20140508-submission-bb
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=adamian/20140508-submission-bb
Alexandru DAMIAN (2):
toaster: fix migration code for MySQL
toaster: modify SQL data type constraints
Belen Barros Pena (1):
toaster: Make sure layer branch only shows when not empty
Dave Lerner (1):
toaster: fix span2 headings for packages
David Reyna (1):
toaster: sort outcome and sstate columns by string value
.../0004_auto__add_field_package_installed_name.py | 1 + ...e__add_target_file__add_field_variablehistor.py | 56 ++--- ...story_operation__chg_field_recipe_descriptio.py | 225 +++++++++++++++++++++ lib/toaster/orm/models.py | 20 +- lib/toaster/toastergui/templates/dirinfo.html | 4 +- .../templates/package_built_dependencies.html | 4 +- .../toastergui/templates/package_built_detail.html | 4 +- .../toastergui/templates/package_detail_base.html | 21 +- .../templates/package_included_tabs.html | 4 +- lib/toaster/toastergui/templates/recipe.html | 22 +- lib/toaster/toastergui/templates/target.html | 6 +- lib/toaster/toastergui/templates/task.html | 2 +- lib/toaster/toastergui/templates/tasks.html | 2 +- lib/toaster/toastergui/views.py | 18 +- 14 files changed, 310 insertions(+), 79 deletions(-) create mode 100644 lib/toaster/orm/migrations/0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descriptio.py
Signature · 1 line
1.9.1