summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py8
-rw-r--r--bitbake/lib/toaster/bldviewer/templates/simple_build.html2
-rw-r--r--bitbake/lib/toaster/bldviewer/templates/simple_recipe.html2
-rw-r--r--bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py301
-rw-r--r--bitbake/lib/toaster/orm/models.py45
-rw-r--r--bitbake/lib/toaster/toastergui/templates/build.html2
-rw-r--r--bitbake/lib/toaster/toastergui/views.py2
7 files changed, 342 insertions, 20 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index b1a418bca9..846465c971 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -44,7 +44,6 @@ class ORMWrapper(object):
44 44
45 def create_build_object(self, build_info): 45 def create_build_object(self, build_info):
46 assert 'machine' in build_info 46 assert 'machine' in build_info
47 assert 'image_fstypes' in build_info
48 assert 'distro' in build_info 47 assert 'distro' in build_info
49 assert 'distro_version' in build_info 48 assert 'distro_version' in build_info
50 assert 'started_on' in build_info 49 assert 'started_on' in build_info
@@ -54,7 +53,6 @@ class ORMWrapper(object):
54 53
55 build = Build.objects.create( 54 build = Build.objects.create(
56 machine=build_info['machine'], 55 machine=build_info['machine'],
57 image_fstypes=build_info['image_fstypes'],
58 distro=build_info['distro'], 56 distro=build_info['distro'],
59 distro_version=build_info['distro_version'], 57 distro_version=build_info['distro_version'],
60 started_on=build_info['started_on'], 58 started_on=build_info['started_on'],
@@ -74,8 +72,7 @@ class ORMWrapper(object):
74 tgt_object = Target.objects.create( build = target_info['build'], 72 tgt_object = Target.objects.create( build = target_info['build'],
75 target = tgt_name, 73 target = tgt_name,
76 is_image = False, 74 is_image = False,
77 file_name = "", 75 );
78 file_size = 0);
79 targets.append(tgt_object) 76 targets.append(tgt_object)
80 return targets 77 return targets
81 78
@@ -375,7 +372,6 @@ class BuildInfoHelper(object):
375 build_info['distro_version'] = self.server.runCommand(["getVariable", "DISTRO_VERSION"])[0] 372 build_info['distro_version'] = self.server.runCommand(["getVariable", "DISTRO_VERSION"])[0]
376 build_info['started_on'] = datetime.datetime.now() 373 build_info['started_on'] = datetime.datetime.now()
377 build_info['completed_on'] = datetime.datetime.now() 374 build_info['completed_on'] = datetime.datetime.now()
378 build_info['image_fstypes'] = self._remove_redundant(self.server.runCommand(["getVariable", "IMAGE_FSTYPES"])[0] or "")
379 build_info['cooker_log_path'] = self.server.runCommand(["getVariable", "BB_CONSOLELOG"])[0] 375 build_info['cooker_log_path'] = self.server.runCommand(["getVariable", "BB_CONSOLELOG"])[0]
380 build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0] 376 build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0]
381 build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0] 377 build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0]
@@ -633,7 +629,6 @@ class BuildInfoHelper(object):
633 recipe_info['license'] = event._depgraph['pn'][pn]['license'] 629 recipe_info['license'] = event._depgraph['pn'][pn]['license']
634 recipe_info['description'] = event._depgraph['pn'][pn]['description'] 630 recipe_info['description'] = event._depgraph['pn'][pn]['description']
635 recipe_info['section'] = event._depgraph['pn'][pn]['section'] 631 recipe_info['section'] = event._depgraph['pn'][pn]['section']
636 recipe_info['licensing_info'] = 'Not Available'
637 recipe_info['homepage'] = event._depgraph['pn'][pn]['homepage'] 632 recipe_info['homepage'] = event._depgraph['pn'][pn]['homepage']
638 recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker'] 633 recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker']
639 recipe_info['file_path'] = file_name 634 recipe_info['file_path'] = file_name
@@ -728,7 +723,6 @@ class BuildInfoHelper(object):
728 m = re.match("([^:]*): md5 checksum matched for ([^;]*)", event.msg) 723 m = re.match("([^:]*): md5 checksum matched for ([^;]*)", event.msg)
729 if m: 724 if m:
730 (pn, fn) = m.groups() 725 (pn, fn) = m.groups()
731 self.internal_state['recipes'][pn].licensing_info = fn
732 self.internal_state['recipes'][pn].save() 726 self.internal_state['recipes'][pn].save()
733 727
734 if event.levelno < format.WARNING: 728 if event.levelno < format.WARNING:
diff --git a/bitbake/lib/toaster/bldviewer/templates/simple_build.html b/bitbake/lib/toaster/bldviewer/templates/simple_build.html
index ecd19df94c..a6983f5804 100644
--- a/bitbake/lib/toaster/bldviewer/templates/simple_build.html
+++ b/bitbake/lib/toaster/bldviewer/templates/simple_build.html
@@ -31,7 +31,7 @@
31 <td>{% time_difference build.started_on build.completed_on %}</td> 31 <td>{% time_difference build.started_on build.completed_on %}</td>
32 <td>{{build.errors_no}}:{% if build.errors_no %}{% for error in logs %}{% if error.build == build %}{% if error.level == 2 %}<p>{{error.message}}</p>{% endif %}{% endif %}{% endfor %}{% else %}None{% endif %}</td> 32 <td>{{build.errors_no}}:{% if build.errors_no %}{% for error in logs %}{% if error.build == build %}{% if error.level == 2 %}<p>{{error.message}}</p>{% endif %}{% endif %}{% endfor %}{% else %}None{% endif %}</td>
33 <td>{{build.warnings_no}}:{% if build.warnings_no %}{% for warning in logs %}{% if warning.build == build %}{% if warning.level == 1 %}<p>{{warning.message}}</p>{% endif %}{% endif %}{% endfor %}{% else %}None{% endif %}</td> 33 <td>{{build.warnings_no}}:{% if build.warnings_no %}{% for warning in logs %}{% if warning.build == build %}{% if warning.level == 1 %}<p>{{warning.message}}</p>{% endif %}{% endif %}{% endfor %}{% else %}None{% endif %}</td>
34 <td>{% if build.outcome == 0 %}{% for t in build.target_set.all %}{% if t.is_image %}{{build.image_fstypes}}{% endif %}{% endfor %}{% endif %}</td> 34 <td>TBD: determine image file list</td>
35 <td>{{build.cooker_log_path}}</td> 35 <td>{{build.cooker_log_path}}</td>
36 <td>{{build.bitbake_version}}</td> 36 <td>{{build.bitbake_version}}</td>
37 <td>{{build.build_name}}</td> 37 <td>{{build.build_name}}</td>
diff --git a/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html b/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html
index 4c7030e48a..77b9de2525 100644
--- a/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html
+++ b/bitbake/lib/toaster/bldviewer/templates/simple_recipe.html
@@ -18,7 +18,6 @@
18 <th>Description</th> 18 <th>Description</th>
19 <th>Section</th> 19 <th>Section</th>
20 <th>License</th> 20 <th>License</th>
21 <th>License file</th>
22 <th>Homepage</th> 21 <th>Homepage</th>
23 <th>Bugtracker</th> 22 <th>Bugtracker</th>
24 <th>File_path</th> 23 <th>File_path</th>
@@ -34,7 +33,6 @@
34 <td>{{recipe.description}}</td> 33 <td>{{recipe.description}}</td>
35 <td>{{recipe.section}}</td> 34 <td>{{recipe.section}}</td>
36 <td>{{recipe.license}}</td> 35 <td>{{recipe.license}}</td>
37 <td>{{recipe.licensing_info}}</td>
38 <td>{{recipe.homepage}}</td> 36 <td>{{recipe.homepage}}</td>
39 <td>{{recipe.bugtracker}}</td> 37 <td>{{recipe.bugtracker}}</td>
40 <td>{{recipe.file_path}}</td> 38 <td>{{recipe.file_path}}</td>
diff --git a/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py b/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py
new file mode 100644
index 0000000000..a55451c6da
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py
@@ -0,0 +1,301 @@
1# -*- coding: utf-8 -*-
2from south.utils import datetime_utils as datetime
3from south.db import db
4from south.v2 import SchemaMigration
5from django.db import models
6
7
8class Migration(SchemaMigration):
9
10 def forwards(self, orm):
11 # Adding model 'Target_Image_File'
12 db.create_table(u'orm_target_image_file', (
13 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('target', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target'])),
15 ('file_name', self.gf('django.db.models.fields.FilePathField')(max_length=100)),
16 ('file_size', self.gf('django.db.models.fields.IntegerField')()),
17 ))
18 db.send_create_signal(u'orm', ['Target_Image_File'])
19
20 # Adding model 'Target_File'
21 db.create_table(u'orm_target_file', (
22 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
23 ('target', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target'])),
24 ('path', self.gf('django.db.models.fields.FilePathField')(max_length=100)),
25 ('size', self.gf('django.db.models.fields.IntegerField')()),
26 ('inodetype', self.gf('django.db.models.fields.IntegerField')()),
27 ('permission', self.gf('django.db.models.fields.IntegerField')()),
28 ('owner', self.gf('django.db.models.fields.CharField')(max_length=128)),
29 ('group', self.gf('django.db.models.fields.CharField')(max_length=128)),
30 ('directory', self.gf('django.db.models.fields.related.ForeignKey')(related_name='directory_set', to=orm['orm.Target_File'])),
31 ('sym_target', self.gf('django.db.models.fields.related.ForeignKey')(related_name='symlink_set', blank=True, to=orm['orm.Target_File'])),
32 ))
33 db.send_create_signal(u'orm', ['Target_File'])
34
35 # Adding field 'VariableHistory.value'
36 db.add_column(u'orm_variablehistory', 'value',
37 self.gf('django.db.models.fields.TextField')(default='', blank=True),
38 keep_default=False)
39
40 # Deleting field 'Recipe.licensing_info'
41 db.delete_column(u'orm_recipe', 'licensing_info')
42
43 # Deleting field 'Target.file_name'
44 db.delete_column(u'orm_target', 'file_name')
45
46 # Deleting field 'Target.file_size'
47 db.delete_column(u'orm_target', 'file_size')
48
49 # Deleting field 'Build.image_fstypes'
50 db.delete_column(u'orm_build', 'image_fstypes')
51
52 # Adding field 'Build.timespent'
53 db.add_column(u'orm_build', 'timespent',
54 self.gf('django.db.models.fields.IntegerField')(default=0),
55 keep_default=False)
56
57 # Adding field 'LogMessage.task'
58 db.add_column(u'orm_logmessage', 'task',
59 self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Task'], null=True, blank=True),
60 keep_default=False)
61
62
63 # Changing field 'Task.elapsed_time'
64 db.alter_column(u'orm_task', 'elapsed_time', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2))
65 # Adding unique constraint on 'Task', fields ['build', 'recipe', 'task_name']
66 db.create_unique(u'orm_task', ['build_id', 'recipe_id', 'task_name'])
67
68
69 def backwards(self, orm):
70 # Removing unique constraint on 'Task', fields ['build', 'recipe', 'task_name']
71 db.delete_unique(u'orm_task', ['build_id', 'recipe_id', 'task_name'])
72
73 # Deleting model 'Target_Image_File'
74 db.delete_table(u'orm_target_image_file')
75
76 # Deleting model 'Target_File'
77 db.delete_table(u'orm_target_file')
78
79 # Deleting field 'VariableHistory.value'
80 db.delete_column(u'orm_variablehistory', 'value')
81
82 # Adding field 'Recipe.licensing_info'
83 db.add_column(u'orm_recipe', 'licensing_info',
84 self.gf('django.db.models.fields.TextField')(default='', blank=True),
85 keep_default=False)
86
87
88 # User chose to not deal with backwards NULL issues for 'Target.file_name'
89 raise RuntimeError("Cannot reverse this migration. 'Target.file_name' and its values cannot be restored.")
90
91 # The following code is provided here to aid in writing a correct migration # Adding field 'Target.file_name'
92 db.add_column(u'orm_target', 'file_name',
93 self.gf('django.db.models.fields.CharField')(max_length=100),
94 keep_default=False)
95
96
97 # User chose to not deal with backwards NULL issues for 'Target.file_size'
98 raise RuntimeError("Cannot reverse this migration. 'Target.file_size' and its values cannot be restored.")
99
100 # The following code is provided here to aid in writing a correct migration # Adding field 'Target.file_size'
101 db.add_column(u'orm_target', 'file_size',
102 self.gf('django.db.models.fields.IntegerField')(),
103 keep_default=False)
104
105
106 # User chose to not deal with backwards NULL issues for 'Build.image_fstypes'
107 raise RuntimeError("Cannot reverse this migration. 'Build.image_fstypes' and its values cannot be restored.")
108
109 # The following code is provided here to aid in writing a correct migration # Adding field 'Build.image_fstypes'
110 db.add_column(u'orm_build', 'image_fstypes',
111 self.gf('django.db.models.fields.CharField')(max_length=100),
112 keep_default=False)
113
114 # Deleting field 'Build.timespent'
115 db.delete_column(u'orm_build', 'timespent')
116
117 # Deleting field 'LogMessage.task'
118 db.delete_column(u'orm_logmessage', 'task_id')
119
120
121 # Changing field 'Task.elapsed_time'
122 db.alter_column(u'orm_task', 'elapsed_time', self.gf('django.db.models.fields.CharField')(max_length=50))
123
124 models = {
125 u'orm.build': {
126 'Meta': {'object_name': 'Build'},
127 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
128 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
129 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
130 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
131 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
132 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
133 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
134 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
135 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
136 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
137 'started_on': ('django.db.models.fields.DateTimeField', [], {}),
138 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
139 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
140 },
141 u'orm.layer': {
142 'Meta': {'object_name': 'Layer'},
143 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
144 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
145 'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
146 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
147 },
148 u'orm.layer_version': {
149 'Meta': {'object_name': 'Layer_Version'},
150 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
151 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
152 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
153 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
154 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
155 'priority': ('django.db.models.fields.IntegerField', [], {})
156 },
157 u'orm.logmessage': {
158 'Meta': {'object_name': 'LogMessage'},
159 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
160 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
161 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
162 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
163 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
164 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
165 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
166 },
167 u'orm.package': {
168 'Meta': {'object_name': 'Package'},
169 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
170 'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
171 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
172 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
173 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
174 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
175 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
176 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
177 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
178 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
179 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
180 'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
181 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
182 },
183 u'orm.package_dependency': {
184 'Meta': {'object_name': 'Package_Dependency'},
185 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
186 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
187 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
188 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
189 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
190 },
191 u'orm.package_file': {
192 'Meta': {'object_name': 'Package_File'},
193 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
194 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
195 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
196 'size': ('django.db.models.fields.IntegerField', [], {})
197 },
198 u'orm.recipe': {
199 'Meta': {'object_name': 'Recipe'},
200 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
201 'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
202 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
203 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
204 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
205 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
206 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
207 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
208 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
209 'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
210 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
211 },
212 u'orm.recipe_dependency': {
213 'Meta': {'object_name': 'Recipe_Dependency'},
214 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
215 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
216 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
217 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
218 },
219 u'orm.target': {
220 'Meta': {'object_name': 'Target'},
221 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
222 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
223 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
224 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
225 },
226 u'orm.target_file': {
227 'Meta': {'object_name': 'Target_File'},
228 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'to': u"orm['orm.Target_File']"}),
229 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
230 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
231 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
232 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
233 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
234 'permission': ('django.db.models.fields.IntegerField', [], {}),
235 'size': ('django.db.models.fields.IntegerField', [], {}),
236 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'blank': 'True', 'to': u"orm['orm.Target_File']"}),
237 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
238 },
239 u'orm.target_image_file': {
240 'Meta': {'object_name': 'Target_Image_File'},
241 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
242 'file_size': ('django.db.models.fields.IntegerField', [], {}),
243 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
244 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
245 },
246 u'orm.target_installed_package': {
247 'Meta': {'object_name': 'Target_Installed_Package'},
248 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
249 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
250 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
251 },
252 u'orm.task': {
253 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
254 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
255 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
256 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
257 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
258 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
259 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
260 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
261 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
262 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
263 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
264 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
265 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
266 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
267 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
268 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
269 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
270 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
271 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
272 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
273 },
274 u'orm.task_dependency': {
275 'Meta': {'object_name': 'Task_Dependency'},
276 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
277 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
278 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
279 },
280 u'orm.variable': {
281 'Meta': {'object_name': 'Variable'},
282 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
283 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
284 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
285 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
286 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
287 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
288 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
289 },
290 u'orm.variablehistory': {
291 'Meta': {'object_name': 'VariableHistory'},
292 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
293 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
294 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
295 'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
296 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
297 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
298 }
299 }
300
301 complete_apps = ['orm'] \ No newline at end of file
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index abc16d9b88..ba3ade06f1 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -34,11 +34,9 @@ class Build(models.Model):
34 (IN_PROGRESS, 'In Progress'), 34 (IN_PROGRESS, 'In Progress'),
35 ) 35 )
36 36
37 search_allowed_fields = ['machine', 'image_fstypes', 37 search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"]
38 'cooker_log_path', "target__target"]
39 38
40 machine = models.CharField(max_length=100) 39 machine = models.CharField(max_length=100)
41 image_fstypes = models.CharField(max_length=100)
42 distro = models.CharField(max_length=100) 40 distro = models.CharField(max_length=100)
43 distro_version = models.CharField(max_length=100) 41 distro_version = models.CharField(max_length=100)
44 started_on = models.DateTimeField() 42 started_on = models.DateTimeField()
@@ -53,16 +51,46 @@ class Build(models.Model):
53 51
54@python_2_unicode_compatible 52@python_2_unicode_compatible
55class Target(models.Model): 53class Target(models.Model):
56 search_allowed_fields = ['target', 'image_fstypes', 'file_name'] 54 search_allowed_fields = ['target', 'file_name']
57 build = models.ForeignKey(Build) 55 build = models.ForeignKey(Build)
58 target = models.CharField(max_length=100) 56 target = models.CharField(max_length=100)
59 is_image = models.BooleanField(default = False) 57 is_image = models.BooleanField(default = False)
60 file_name = models.CharField(max_length=100)
61 file_size = models.IntegerField()
62 58
63 def __str__(self): 59 def __str__(self):
64 return self.target 60 return self.target
65 61
62class Target_Image_File(models.Model):
63 target = models.ForeignKey(Target)
64 file_name = models.FilePathField(max_length=100)
65 file_size = models.IntegerField()
66
67class Target_File(models.Model):
68 ITYPE_REGULAR = 1
69 ITYPE_DIRECTORY = 2
70 ITYPE_SYMLINK = 3
71 ITYPE_SOCKET = 4
72 ITYPE_FIFO = 5
73 ITYPE_CHARACTER = 6
74 ITYPE_BLOCK = 7
75 ITYPE_SYMBLINK = 8
76 ITYPES = ( (ITYPE_REGULAR ,'regular'),
77 ( ITYPE_DIRECTORY ,'directory'),
78 ( ITYPE_SYMLINK ,'symlink'),
79 ( ITYPE_SOCKET ,'socket'),
80 ( ITYPE_FIFO ,'fifo'),
81 ( ITYPE_CHARACTER ,'character'),
82 ( ITYPE_BLOCK ,'block'),
83 ( ITYPE_SYMLINK ,'symblink'))
84
85 target = models.ForeignKey(Target)
86 path = models.FilePathField()
87 size = models.IntegerField()
88 inodetype = models.IntegerField(choices = ITYPES)
89 permission = models.IntegerField()
90 owner = models.CharField(max_length=128)
91 group = models.CharField(max_length=128)
92 directory = models.ForeignKey('Target_File', related_name="directory_set")
93 sym_target = models.ForeignKey('Target_File', related_name="symlink_set", blank=True)
66 94
67 95
68class TaskManager(models.Manager): 96class TaskManager(models.Manager):
@@ -149,7 +177,7 @@ class Task(models.Model):
149 line_number = models.IntegerField(default=0) 177 line_number = models.IntegerField(default=0)
150 disk_io = models.IntegerField(null=True) 178 disk_io = models.IntegerField(null=True)
151 cpu_usage = models.DecimalField(max_digits=6, decimal_places=2, null=True) 179 cpu_usage = models.DecimalField(max_digits=6, decimal_places=2, null=True)
152 elapsed_time = models.CharField(max_length=50, default=0) 180 elapsed_time = models.DecimalField(max_digits=6, decimal_places=2, null=True)
153 sstate_result = models.IntegerField(choices=SSTATE_RESULT, default=SSTATE_NA) 181 sstate_result = models.IntegerField(choices=SSTATE_RESULT, default=SSTATE_NA)
154 message = models.CharField(max_length=240) 182 message = models.CharField(max_length=240)
155 logfile = models.FilePathField(max_length=255, blank=True) 183 logfile = models.FilePathField(max_length=255, blank=True)
@@ -236,7 +264,6 @@ class Recipe(models.Model):
236 description = models.CharField(max_length=100, blank=True) 264 description = models.CharField(max_length=100, blank=True)
237 section = models.CharField(max_length=100, blank=True) 265 section = models.CharField(max_length=100, blank=True)
238 license = models.CharField(max_length=200, blank=True) 266 license = models.CharField(max_length=200, blank=True)
239 licensing_info = models.TextField(blank=True)
240 homepage = models.URLField(blank=True) 267 homepage = models.URLField(blank=True)
241 bugtracker = models.URLField(blank=True) 268 bugtracker = models.URLField(blank=True)
242 file_path = models.FilePathField(max_length=255) 269 file_path = models.FilePathField(max_length=255)
@@ -280,6 +307,7 @@ class Variable(models.Model):
280 307
281class VariableHistory(models.Model): 308class VariableHistory(models.Model):
282 variable = models.ForeignKey(Variable, related_name='vhistory') 309 variable = models.ForeignKey(Variable, related_name='vhistory')
310 value = models.TextField(blank=True)
283 file_name = models.FilePathField(max_length=255) 311 file_name = models.FilePathField(max_length=255)
284 line_number = models.IntegerField(null=True) 312 line_number = models.IntegerField(null=True)
285 operation = models.CharField(max_length=16) 313 operation = models.CharField(max_length=16)
@@ -294,6 +322,7 @@ class LogMessage(models.Model):
294 (ERROR, "error") ) 322 (ERROR, "error") )
295 323
296 build = models.ForeignKey(Build) 324 build = models.ForeignKey(Build)
325 task = models.ForeignKey(Task, blank = True, null=True)
297 level = models.IntegerField(choices=LOG_LEVEL, default=INFO) 326 level = models.IntegerField(choices=LOG_LEVEL, default=INFO)
298 message=models.CharField(max_length=240) 327 message=models.CharField(max_length=240)
299 pathname = models.FilePathField(max_length=255, blank=True) 328 pathname = models.FilePathField(max_length=255, blank=True)
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html
index bdfa5c20e3..3b0c614502 100644
--- a/bitbake/lib/toaster/toastergui/templates/build.html
+++ b/bitbake/lib/toaster/toastergui/templates/build.html
@@ -94,7 +94,7 @@
94 <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td> 94 <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td>
95 <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td> 95 <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
96 <td class="log">{{build.cooker_log_path}}</td> 96 <td class="log">{{build.cooker_log_path}}</td>
97 <td class="output">{% if build.outcome == 0 %}{% for t in build.target_set.all %}{% if t.is_image %}<a href="{%url "builddashboard" build.id%}#images">{{build.image_fstypes}}</a>{% endif %}{% endfor %}{% endif %}</td> 97 <td class="output">{% if build.outcome == 0 %}{% for t in build.target_set.all %}{% if t.is_image %}<a href="{%url "builddashboard" build.id%}#images">TODO: compute image output fstypes</a>{% endif %}{% endfor %}{% endif %}</td>
98 </tr> 98 </tr>
99 99
100 {% endfor %} 100 {% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 3a362e6fe6..8383e73434 100644
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -329,7 +329,7 @@ def builds(request):
329 }, 329 },
330 {'name': 'Output', 'clclass': 'output', 330 {'name': 'Output', 'clclass': 'output',
331 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory", 331 'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",
332 'orderfield': _get_toggle_order(request, "image_fstypes") 332 # TODO: compute image fstypes from Target_Image_File
333 }, 333 },
334 ] 334 ]
335 } 335 }