summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-09-28 21:45:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 14:11:37 +0100
commit3ff6401723289fb53a2797abd971c25b697822cb (patch)
tree53982bd2b6208c7b4921f16ea54c7c4fbab9f8c3
parent8948d04bfd0dc84dda8d6575a7b4ed4ac6e73a15 (diff)
downloadpoky-3ff6401723289fb53a2797abd971c25b697822cb.tar.gz
bitbake: toaster: Add CustomImageRecipe model
This model lists custom image recipes for the project. It is populated when new custom image is created. It holds reference to the base recipe and list of packages included into custom image. For CustomImageRecipes the packages will be copied in and therefore not associated with a build so Remove the requirement for the package to have a Build. co-author: Ed Bartosh <ed.bartosh@linux.intel.com> (Bitbake rev: 33cbf4cd3b4ca47c4901501f5f1eafdfdfdae023) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/orm/migrations/0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_project.py375
-rw-r--r--bitbake/lib/toaster/orm/models.py11
2 files changed, 385 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/migrations/0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_project.py b/bitbake/lib/toaster/orm/migrations/0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_project.py
new file mode 100644
index 0000000000..6030605148
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_project.py
@@ -0,0 +1,375 @@
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 'CustomImageRecipe'
12 db.create_table(u'orm_customimagerecipe', (
13 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
15 ('base_recipe', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Recipe'])),
16 ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
17 ))
18 db.send_create_signal(u'orm', ['CustomImageRecipe'])
19
20 # Adding M2M table for field packages on 'CustomImageRecipe'
21 m2m_table_name = db.shorten_name(u'orm_customimagerecipe_packages')
22 db.create_table(m2m_table_name, (
23 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
24 ('customimagerecipe', models.ForeignKey(orm[u'orm.customimagerecipe'], null=False)),
25 ('package', models.ForeignKey(orm[u'orm.package'], null=False))
26 ))
27 db.create_unique(m2m_table_name, ['customimagerecipe_id', 'package_id'])
28
29 # Adding unique constraint on 'CustomImageRecipe', fields ['name', 'project']
30 db.create_unique(u'orm_customimagerecipe', ['name', 'project_id'])
31
32
33 # Changing field 'Package.build'
34 db.alter_column(u'orm_package', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'], null=True))
35
36 def backwards(self, orm):
37 # Removing unique constraint on 'CustomImageRecipe', fields ['name', 'project']
38 db.delete_unique(u'orm_customimagerecipe', ['name', 'project_id'])
39
40 # Deleting model 'CustomImageRecipe'
41 db.delete_table(u'orm_customimagerecipe')
42
43 # Removing M2M table for field packages on 'CustomImageRecipe'
44 db.delete_table(db.shorten_name(u'orm_customimagerecipe_packages'))
45
46
47 # Changing field 'Package.build'
48 db.alter_column(u'orm_package', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.Build']))
49
50 models = {
51 u'orm.bitbakeversion': {
52 'Meta': {'object_name': 'BitbakeVersion'},
53 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
54 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
55 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
56 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
57 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
58 },
59 u'orm.branch': {
60 'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
61 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
63 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
64 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
65 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
66 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
67 },
68 u'orm.build': {
69 'Meta': {'object_name': 'Build'},
70 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
71 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
72 'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
73 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
74 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
75 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
76 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
77 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
78 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
79 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
80 'started_on': ('django.db.models.fields.DateTimeField', [], {})
81 },
82 u'orm.buildartifact': {
83 'Meta': {'object_name': 'BuildArtifact'},
84 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
85 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
86 'file_size': ('django.db.models.fields.IntegerField', [], {}),
87 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
88 },
89 u'orm.customimagerecipe': {
90 'Meta': {'unique_together': "(('name', 'project'),)", 'object_name': 'CustomImageRecipe'},
91 'base_recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']"}),
92 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
94 'packages': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['orm.Package']", 'symmetrical': 'False'}),
95 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
96 },
97 u'orm.helptext': {
98 'Meta': {'object_name': 'HelpText'},
99 'area': ('django.db.models.fields.IntegerField', [], {}),
100 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
101 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
103 'text': ('django.db.models.fields.TextField', [], {})
104 },
105 u'orm.layer': {
106 'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
107 'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
108 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
109 'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
110 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
111 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
112 'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
113 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
114 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
115 'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
116 'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
117 'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
118 'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
119 },
120 u'orm.layer_version': {
121 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
122 'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
123 'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
124 'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
125 'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
126 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
127 'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
128 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
129 'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
130 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
131 'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
132 'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
133 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
134 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
135 },
136 u'orm.layersource': {
137 'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
138 'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
139 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
140 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
141 'sourcetype': ('django.db.models.fields.IntegerField', [], {})
142 },
143 u'orm.layerversiondependency': {
144 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
145 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
146 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
147 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
148 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
149 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
150 },
151 u'orm.logmessage': {
152 'Meta': {'object_name': 'LogMessage'},
153 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
154 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
155 'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
156 'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
157 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
158 'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
159 'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
160 },
161 u'orm.machine': {
162 'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
163 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
164 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
165 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
166 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
167 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
168 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
169 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
170 },
171 u'orm.package': {
172 'Meta': {'object_name': 'Package'},
173 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
174 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
175 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
176 'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
177 'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
178 'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
179 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
180 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
181 'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
182 'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
183 'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
184 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
185 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
186 },
187 u'orm.package_dependency': {
188 'Meta': {'object_name': 'Package_Dependency'},
189 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
190 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
191 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
192 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
193 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
194 },
195 u'orm.package_file': {
196 'Meta': {'object_name': 'Package_File'},
197 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
198 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
199 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
200 'size': ('django.db.models.fields.IntegerField', [], {})
201 },
202 u'orm.project': {
203 'Meta': {'object_name': 'Project'},
204 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
205 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
206 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
207 'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
208 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
209 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
210 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
211 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
212 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
213 },
214 u'orm.projectlayer': {
215 'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
216 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
217 'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
218 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
219 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
220 },
221 u'orm.projecttarget': {
222 'Meta': {'object_name': 'ProjectTarget'},
223 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
224 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
225 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
226 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
227 },
228 u'orm.projectvariable': {
229 'Meta': {'object_name': 'ProjectVariable'},
230 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
231 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
232 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
233 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
234 },
235 u'orm.recipe': {
236 'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
237 'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
238 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
239 'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
240 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
241 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
242 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
243 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
244 'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
245 'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
246 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
247 'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
248 'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
249 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
250 'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
251 'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
252 'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
253 },
254 u'orm.recipe_dependency': {
255 'Meta': {'object_name': 'Recipe_Dependency'},
256 'dep_type': ('django.db.models.fields.IntegerField', [], {}),
257 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
258 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
259 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
260 },
261 u'orm.release': {
262 'Meta': {'object_name': 'Release'},
263 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
264 'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
265 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
266 'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
267 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
268 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
269 },
270 u'orm.releasedefaultlayer': {
271 'Meta': {'object_name': 'ReleaseDefaultLayer'},
272 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
273 'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
274 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
275 },
276 u'orm.releaselayersourcepriority': {
277 'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
278 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
279 'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
280 'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
281 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
282 },
283 u'orm.target': {
284 'Meta': {'object_name': 'Target'},
285 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
286 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
287 'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
288 'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
289 'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
290 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
291 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
292 },
293 u'orm.target_file': {
294 'Meta': {'object_name': 'Target_File'},
295 'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
296 'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
297 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
298 'inodetype': ('django.db.models.fields.IntegerField', [], {}),
299 'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
300 'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
301 'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
302 'size': ('django.db.models.fields.IntegerField', [], {}),
303 'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
304 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
305 },
306 u'orm.target_image_file': {
307 'Meta': {'object_name': 'Target_Image_File'},
308 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
309 'file_size': ('django.db.models.fields.IntegerField', [], {}),
310 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
311 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
312 },
313 u'orm.target_installed_package': {
314 'Meta': {'object_name': 'Target_Installed_Package'},
315 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
316 'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
317 'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
318 },
319 u'orm.task': {
320 'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
321 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
322 'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
323 'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
324 'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
325 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
326 'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
327 'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
328 'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
329 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
330 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
331 'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
332 'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
333 'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
334 'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
335 'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
336 'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
337 'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
338 'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
339 'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
340 },
341 u'orm.task_dependency': {
342 'Meta': {'object_name': 'Task_Dependency'},
343 'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
344 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
345 'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
346 },
347 u'orm.toastersetting': {
348 'Meta': {'object_name': 'ToasterSetting'},
349 'helptext': ('django.db.models.fields.TextField', [], {}),
350 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
351 'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
352 'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
353 },
354 u'orm.variable': {
355 'Meta': {'object_name': 'Variable'},
356 'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
357 'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
358 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
359 'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
360 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
361 'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
362 'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
363 },
364 u'orm.variablehistory': {
365 'Meta': {'object_name': 'VariableHistory'},
366 'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
367 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
368 'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
369 'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
370 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
371 'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
372 }
373 }
374
375 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 b5c864354d..9790630502 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -551,7 +551,7 @@ class Task_Dependency(models.Model):
551 551
552class Package(models.Model): 552class Package(models.Model):
553 search_allowed_fields = ['name', 'version', 'revision', 'recipe__name', 'recipe__version', 'recipe__license', 'recipe__layer_version__layer__name', 'recipe__layer_version__branch', 'recipe__layer_version__commit', 'recipe__layer_version__local_path', 'installed_name'] 553 search_allowed_fields = ['name', 'version', 'revision', 'recipe__name', 'recipe__version', 'recipe__license', 'recipe__layer_version__layer__name', 'recipe__layer_version__branch', 'recipe__layer_version__commit', 'recipe__layer_version__local_path', 'installed_name']
554 build = models.ForeignKey('Build') 554 build = models.ForeignKey('Build', null=True)
555 recipe = models.ForeignKey('Recipe', null=True) 555 recipe = models.ForeignKey('Recipe', null=True)
556 name = models.CharField(max_length=100) 556 name = models.CharField(max_length=100)
557 installed_name = models.CharField(max_length=100, default='') 557 installed_name = models.CharField(max_length=100, default='')
@@ -1172,6 +1172,15 @@ class ProjectLayer(models.Model):
1172 class Meta: 1172 class Meta:
1173 unique_together = (("project", "layercommit"),) 1173 unique_together = (("project", "layercommit"),)
1174 1174
1175class CustomImageRecipe(models.Model):
1176 name = models.CharField(max_length=100)
1177 base_recipe = models.ForeignKey(Recipe)
1178 packages = models.ManyToManyField(Package)
1179 project = models.ForeignKey(Project)
1180
1181 class Meta:
1182 unique_together = ("name", "project")
1183
1175class ProjectVariable(models.Model): 1184class ProjectVariable(models.Model):
1176 project = models.ForeignKey(Project) 1185 project = models.ForeignKey(Project)
1177 name = models.CharField(max_length=100) 1186 name = models.CharField(max_length=100)