On 25/03/2015 14:41, "Scott Rifenbark" <[email protected]> wrote:
> > >On Wed, Mar 25, 2015 at 7:09 AM, Barros Pena, Belen ><[email protected]> wrote: > > > >On 25/03/2015 14:00, "Damian, Alexandru" <[email protected]> >wrote: > >>It needs to be run on a new database, without data in it... > >Aha: now it works :) We should probably add that to the loadconf section >we have in the Toaster manual >(http://www.yoctoproject.org/docs/1.8/toaster-manual/toaster-manual.html#t >o >aster-command-loadconf) > >Cheers > >Belén > >I have updated that entry in the manual to state that we need to run this >command on a new database void of data. Looks good to me. Thanks! > > >Scott > > > > > > >> >> >> >>On Wed, Mar 25, 2015 at 1:52 PM, Barros Pena, Belen >><[email protected]> wrote: >> >> >> >>On 24/03/2015 17:06, "Damian, Alexandru" <[email protected]> >>wrote: >> >>>Seems fine to me. The standard test is that "loadconf" command loads the >>>file without issues. >> >>Duh, of course. Why didn't I think of that? >> >>So I gave this a try, but the loadconf command fails. If a database file >>exists, I get this error: >> >>Traceback (most recent call last): >> File "bitbake/lib/toaster/manage.py", line 10, in <module> >> execute_from_command_line(sys.argv) >> File >>"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.p >>y >>" >>, >>line 399, in execute_from_command_line >> utility.execute() >> File >>"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.p >>y >>" >>, >>line 392, in execute >> self.fetch_command(subcommand).run_from_argv(self.argv) >> File >>"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", >>line 242, in run_from_argv >> self.execute(*args, **options.__dict__) >> File >>"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", >>line 285, in execute >> output = self.handle(*args, **options) >> File >>"/home/yocto/toaster/bitbake/lib/toaster/bldcontrol/management/commands/l >>o >>a >>dconf.py", >>line 171, in handle >> self._import_layer_config(filepath) >> File >>"/home/yocto/toaster/bitbake/lib/toaster/bldcontrol/management/commands/l >>o >>a >>dconf.py", >>line 97, in _import_layer_config >> apiurl = apiurl >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", >>line 157, in create >> return self.get_queryset().create(**kwargs) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", >>line 319, in create >> obj.save(force_insert=True, using=self.db) >> File "/home/yocto/toaster/bitbake/lib/toaster/orm/models.py", line >>651, in save >> return super(LayerSource, self).save(*args, **kwargs) >> File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", >>line 545, in save >> force_update=force_update, update_fields=update_fields) >> File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", >>line 573, in save_base >> updated = self._save_table(raw, cls, force_insert, force_update, >>using, update_fields) >> File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", >>line 654, in _save_table >> result = self._do_insert(cls._base_manager, using, fields, update_pk, >>raw) >> File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", >>line 687, in _do_insert >> using=using, raw=raw) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", >>line 232, in _insert >> return insert_query(self.model, objs, fields, **kwargs) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", >>line 1511, in insert_query >> return query.get_compiler(using=using).execute_sql(return_id) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" >>, >>line 898, in execute_sql >> cursor.execute(sql, params) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", >>line 69, in execute >> return super(CursorDebugWrapper, self).execute(sql, params) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", >>line 53, in execute >> return self.cursor.execute(sql, params) >> File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", >>line 99, in __exit__ >> six.reraise(dj_exc_type, dj_exc_value, traceback) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", >>line 53, in execute >> return self.cursor.execute(sql, params) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.p >>y >>" >>, >>line 450, in execute >> return Database.Cursor.execute(self, query, params) >>django.db.utils.IntegrityError: UNIQUE constraint failed: >>orm_layersource.name <http://orm_layersource.name> >><http://orm_layersource.name> >> >> >>If a database file does not exist, I get this error: >> >>Traceback (most recent call last): >> File "bitbake/lib/toaster/manage.py", line 10, in <module> >> execute_from_command_line(sys.argv) >> File >>"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.p >>y >>" >>, >>line 399, in execute_from_command_line >> utility.execute() >> File >>"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.p >>y >>" >>, >>line 392, in execute >> self.fetch_command(subcommand).run_from_argv(self.argv) >> File >>"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", >>line 242, in run_from_argv >> self.execute(*args, **options.__dict__) >> File >>"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", >>line 285, in execute >> output = self.handle(*args, **options) >> File >>"/home/yocto/toaster/bitbake/lib/toaster/bldcontrol/management/commands/l >>o >>a >>dconf.py", >>line 171, in handle >> self._import_layer_config(filepath) >> File >>"/home/yocto/toaster/bitbake/lib/toaster/bldcontrol/management/commands/l >>o >>a >>dconf.py", >>line 68, in _import_layer_config >> bvo, created = BitbakeVersion.objects.get_or_create(name=bvi['name']) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", >>line 154, in get_or_create >> return self.get_queryset().get_or_create(**kwargs) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", >>line 373, in get_or_create >> return self.get(**lookup), False >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", >>line 301, in get >> num = len(clone) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", >>line 77, in __len__ >> self._fetch_all() >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", >>line 854, in _fetch_all >> self._result_cache = list(self.iterator()) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", >>line 220, in iterator >> for row in compiler.results_iter(): >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" >>, >>line 710, in results_iter >> for rows in self.execute_sql(MULTI): >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" >>, >>line 781, in execute_sql >> cursor.execute(sql, params) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", >>line 69, in execute >> return super(CursorDebugWrapper, self).execute(sql, params) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", >>line 53, in execute >> return self.cursor.execute(sql, params) >> File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", >>line 99, in __exit__ >> six.reraise(dj_exc_type, dj_exc_value, traceback) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", >>line 53, in execute >> return self.cursor.execute(sql, params) >> File >>"/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.p >>y >>" >>, >>line 450, in execute >> return Database.Cursor.execute(self, query, params) >>django.db.utils.OperationalError: no such table: orm_bitbakeversion >> >> >>I also get this error if I try to load a toasterconf.json file that I >>know >>works (meta-yocto/conf/toasterconf.json). This is on >>master:5c76cebc24675edb3dff473fce9b67cedff615db >> >>Am I doing something wrong? >> >>Thanks! >> >>Belén >> >>> >>> >>> >>>Alex >>> >>> >>> >>>On Sun, Mar 22, 2015 at 2:12 PM, belen barros pena >>><[email protected]> wrote: >>> >>>I have added the imported layer source to the >>>Toasterconf.json.txt.patch file. I've uploaded the file to >>> >>>https://bugzilla.yoctoproject.org/attachment.cgi?id=2450 >>> >>>Could you please review and make sure it's ok? >>> >>>Thanks, >>> >>>Belen >>>-- >>>_______________________________________________ >>>toaster mailing list >>>[email protected] >>>https://lists.yoctoproject.org/listinfo/toaster >>> >>> >>> >>> >>> >>> >>>-- >>>Alex Damian >>>Yocto Project >>> >>>SSG / OTC >>> >>> >>> >> >> >> >> >> >> >> >> >> >>-- >>Alex Damian >>Yocto Project >> >>SSG / OTC >> >> >> > > > > > > > -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
