diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-07-15 12:35:43 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-23 20:06:57 +0100 |
commit | 6cfb76fa8bd1c192e6a0524b7670e2172e5d8e26 (patch) | |
tree | 8210bd00ecda985d8498c3d4ebc41bf38fb65540 /bitbake/lib/toaster/bldcontrol/migrations | |
parent | 5ba68f32a86a20b3f3544903fea2a24f2e59afbf (diff) | |
download | poky-6cfb76fa8bd1c192e6a0524b7670e2172e5d8e26.tar.gz |
bitbake: toaster: add fields for sourcedir and builddir paths
We add explicit absolute paths for a directory where
the layer sources will be checked out (sourcedir) and
where the build activities will take place.
Adding minimal checking when starting the application in
order to make sure that BuildEnvironment (BE) settings are
usable. This check is ran by the toaster script at startup.
Modify the localhost bbcontroller to use the BE settings
instead of trying to self-configure on checked out sources.
(Bitbake rev: d17500d3f73fdeeef5f11fb3773a65e927be3f02)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/migrations')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py b/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py new file mode 100644 index 0000000000..f522a500b6 --- /dev/null +++ b/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py | |||
@@ -0,0 +1,106 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | from south.utils import datetime_utils as datetime | ||
3 | from south.db import db | ||
4 | from south.v2 import SchemaMigration | ||
5 | from django.db import models | ||
6 | |||
7 | |||
8 | class Migration(SchemaMigration): | ||
9 | |||
10 | def forwards(self, orm): | ||
11 | # Adding field 'BuildEnvironment.sourcedir' | ||
12 | db.add_column(u'bldcontrol_buildenvironment', 'sourcedir', | ||
13 | self.gf('django.db.models.fields.CharField')(default='', max_length=512, blank=True), | ||
14 | keep_default=False) | ||
15 | |||
16 | # Adding field 'BuildEnvironment.builddir' | ||
17 | db.add_column(u'bldcontrol_buildenvironment', 'builddir', | ||
18 | self.gf('django.db.models.fields.CharField')(default='', max_length=512, blank=True), | ||
19 | keep_default=False) | ||
20 | |||
21 | |||
22 | def backwards(self, orm): | ||
23 | # Deleting field 'BuildEnvironment.sourcedir' | ||
24 | db.delete_column(u'bldcontrol_buildenvironment', 'sourcedir') | ||
25 | |||
26 | # Deleting field 'BuildEnvironment.builddir' | ||
27 | db.delete_column(u'bldcontrol_buildenvironment', 'builddir') | ||
28 | |||
29 | |||
30 | models = { | ||
31 | u'bldcontrol.brlayer': { | ||
32 | 'Meta': {'object_name': 'BRLayer'}, | ||
33 | 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
34 | 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
35 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
36 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
37 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}) | ||
38 | }, | ||
39 | u'bldcontrol.brtarget': { | ||
40 | 'Meta': {'object_name': 'BRTarget'}, | ||
41 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
42 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
43 | 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
44 | 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}) | ||
45 | }, | ||
46 | u'bldcontrol.brvariable': { | ||
47 | 'Meta': {'object_name': 'BRVariable'}, | ||
48 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
49 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
50 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
51 | 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | ||
52 | }, | ||
53 | u'bldcontrol.buildenvironment': { | ||
54 | 'Meta': {'object_name': 'BuildEnvironment'}, | ||
55 | 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
56 | 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}), | ||
57 | 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), | ||
58 | 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
59 | 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}), | ||
60 | 'betype': ('django.db.models.fields.IntegerField', [], {}), | ||
61 | 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), | ||
62 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
63 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
64 | 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
65 | 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), | ||
66 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
67 | }, | ||
68 | u'bldcontrol.buildrequest': { | ||
69 | 'Meta': {'object_name': 'BuildRequest'}, | ||
70 | 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}), | ||
71 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
72 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
73 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}), | ||
74 | 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
75 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
76 | }, | ||
77 | u'orm.build': { | ||
78 | 'Meta': {'object_name': 'Build'}, | ||
79 | 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}), | ||
80 | 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
81 | 'completed_on': ('django.db.models.fields.DateTimeField', [], {}), | ||
82 | 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}), | ||
83 | 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
84 | 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
85 | 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
86 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
87 | 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
88 | 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}), | ||
89 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}), | ||
90 | 'started_on': ('django.db.models.fields.DateTimeField', [], {}), | ||
91 | 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
92 | 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}) | ||
93 | }, | ||
94 | u'orm.project': { | ||
95 | 'Meta': {'object_name': 'Project'}, | ||
96 | 'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}), | ||
97 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
98 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
99 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
100 | 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), | ||
101 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
102 | 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'}) | ||
103 | } | ||
104 | } | ||
105 | |||
106 | complete_apps = ['bldcontrol'] \ No newline at end of file | ||