diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-10-13 17:10:39 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-10-30 13:39:51 +0000 |
| commit | 2837b110ae8fd5ff0ca3ac5959cadb7d4a5ce6cc (patch) | |
| tree | fca7aba2e90cbcb6f3b11a90bb00665850fa2460 /bitbake/lib/toaster/bldcontrol/migrations | |
| parent | a0660718e6599538dd65cadadbc04c6adc951b57 (diff) | |
| download | poky-2837b110ae8fd5ff0ca3ac5959cadb7d4a5ce6cc.tar.gz | |
bitbake: toaster: change startup parameter passing to avoid race
We avoid a race between the setting the TOASTER_BRBE variable
and reading the variable in toaster ui by supplying the variable
at server startup time through the toaster.conf post-read file.
Additional small changes are included, including marking the
build request with the environment id of where the build took place.
(Bitbake rev: 7c333350418c4140e6c988c5272940f8057d327d)
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/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py b/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py new file mode 100644 index 0000000000..70677a294e --- /dev/null +++ b/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py | |||
| @@ -0,0 +1,145 @@ | |||
| 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 'BuildRequest.environment' | ||
| 12 | db.add_column(u'bldcontrol_buildrequest', 'environment', | ||
| 13 | self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildEnvironment'], null=True), | ||
| 14 | keep_default=False) | ||
| 15 | |||
| 16 | |||
| 17 | # Changing field 'BuildRequest.build' | ||
| 18 | db.alter_column(u'bldcontrol_buildrequest', 'build_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['orm.Build'], unique=True, null=True)) | ||
| 19 | # Adding unique constraint on 'BuildRequest', fields ['build'] | ||
| 20 | db.create_unique(u'bldcontrol_buildrequest', ['build_id']) | ||
| 21 | |||
| 22 | |||
| 23 | def backwards(self, orm): | ||
| 24 | # Removing unique constraint on 'BuildRequest', fields ['build'] | ||
| 25 | db.delete_unique(u'bldcontrol_buildrequest', ['build_id']) | ||
| 26 | |||
| 27 | # Deleting field 'BuildRequest.environment' | ||
| 28 | db.delete_column(u'bldcontrol_buildrequest', 'environment_id') | ||
| 29 | |||
| 30 | |||
| 31 | # Changing field 'BuildRequest.build' | ||
| 32 | db.alter_column(u'bldcontrol_buildrequest', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'], null=True)) | ||
| 33 | |||
| 34 | models = { | ||
| 35 | u'bldcontrol.brbitbake': { | ||
| 36 | 'Meta': {'object_name': 'BRBitbake'}, | ||
| 37 | 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 38 | 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 39 | 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 40 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 41 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']", 'unique': 'True'}) | ||
| 42 | }, | ||
| 43 | u'bldcontrol.brerror': { | ||
| 44 | 'Meta': {'object_name': 'BRError'}, | ||
| 45 | 'errmsg': ('django.db.models.fields.TextField', [], {}), | ||
| 46 | 'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 47 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 48 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
| 49 | 'traceback': ('django.db.models.fields.TextField', [], {}) | ||
| 50 | }, | ||
| 51 | u'bldcontrol.brlayer': { | ||
| 52 | 'Meta': {'object_name': 'BRLayer'}, | ||
| 53 | 'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 54 | 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 55 | 'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 56 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 57 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 58 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}) | ||
| 59 | }, | ||
| 60 | u'bldcontrol.brtarget': { | ||
| 61 | 'Meta': {'object_name': 'BRTarget'}, | ||
| 62 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 63 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
| 64 | 'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 65 | 'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}) | ||
| 66 | }, | ||
| 67 | u'bldcontrol.brvariable': { | ||
| 68 | 'Meta': {'object_name': 'BRVariable'}, | ||
| 69 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 70 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 71 | 'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}), | ||
| 72 | 'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | ||
| 73 | }, | ||
| 74 | u'bldcontrol.buildenvironment': { | ||
| 75 | 'Meta': {'object_name': 'BuildEnvironment'}, | ||
| 76 | 'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}), | ||
| 77 | 'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}), | ||
| 78 | 'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}), | ||
| 79 | 'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 80 | 'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}), | ||
| 81 | 'betype': ('django.db.models.fields.IntegerField', [], {}), | ||
| 82 | 'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), | ||
| 83 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 84 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 85 | 'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 86 | 'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}), | ||
| 87 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
| 88 | }, | ||
| 89 | u'bldcontrol.buildrequest': { | ||
| 90 | 'Meta': {'object_name': 'BuildRequest'}, | ||
| 91 | 'build': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['orm.Build']", 'unique': 'True', 'null': 'True'}), | ||
| 92 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 93 | 'environment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildEnvironment']", 'null': 'True'}), | ||
| 94 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 95 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}), | ||
| 96 | 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 97 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
| 98 | }, | ||
| 99 | u'orm.bitbakeversion': { | ||
| 100 | 'Meta': {'object_name': 'BitbakeVersion'}, | ||
| 101 | 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | ||
| 102 | 'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | ||
| 103 | 'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}), | ||
| 104 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 105 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) | ||
| 106 | }, | ||
| 107 | u'orm.build': { | ||
| 108 | 'Meta': {'object_name': 'Build'}, | ||
| 109 | 'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}), | ||
| 110 | 'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 111 | 'completed_on': ('django.db.models.fields.DateTimeField', [], {}), | ||
| 112 | 'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}), | ||
| 113 | 'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 114 | 'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 115 | 'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 116 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 117 | 'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 118 | 'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}), | ||
| 119 | 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}), | ||
| 120 | 'started_on': ('django.db.models.fields.DateTimeField', [], {}), | ||
| 121 | 'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
| 122 | 'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}) | ||
| 123 | }, | ||
| 124 | u'orm.project': { | ||
| 125 | 'Meta': {'object_name': 'Project'}, | ||
| 126 | 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}), | ||
| 127 | 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
| 128 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 129 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
| 130 | 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}), | ||
| 131 | 'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), | ||
| 132 | 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
| 133 | 'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'}) | ||
| 134 | }, | ||
| 135 | u'orm.release': { | ||
| 136 | 'Meta': {'object_name': 'Release'}, | ||
| 137 | 'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}), | ||
| 138 | 'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | ||
| 139 | 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | ||
| 140 | u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
| 141 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}) | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | complete_apps = ['bldcontrol'] \ No newline at end of file | ||
