[Toaster] Adding custom toasterconf.json file for Mentor

sujith h sujith.h at gmail.com
Fri Aug 7 05:58:48 PDT 2015


On Fri, Aug 7, 2015 at 6:07 PM, Ed Bartosh <ed.bartosh at linux.intel.com>
wrote:

> On Fri, Aug 07, 2015 at 05:49:45PM +0530, sujith h wrote:
> > On Fri, Aug 7, 2015 at 5:31 PM, sujith h <sujith.h at gmail.com> wrote:
> >
> > >
> > >
> > > On Fri, Aug 7, 2015 at 5:11 PM, Ed Bartosh <ed.bartosh at linux.intel.com
> >
> > > wrote:
> > >
> > >> Hi Sujith,
> > >>
> > >> It looks like your repository doesn't have 'origin' remote, which
> > >> failing code is trying to find in 'git remote -v' output.
> > >>
> > >> For your repository git remote -v prints the following 2 lines:
> > >> mel    ssh://git@github.com/MentorEmbedded/meta-mentor.git (fetch)
> > >> mel    ssh://git@github.com/MentorEmbedded/meta-mentor.git (push)
> > >>
> > >> so, your remote name is 'mel'. My guess is that 'origin' is taken from
> > >> your toasterconfig.json. Unfortunately I can't
> > >> reproduce this on my machine as I don't have your layers.
> > >>
> > >> I'd suggest to replace 'origin' with 'mel' in your config and try
> again.
> > >>
> > >
> > > Sure Ed, I would try to use mel instead of origin and I will update the
> > > result. Thanks for the pointer.
> > >
> >
> > When I change to mel in the config file, the error I get is :
> >
>
> This happened because of this db constraint for SourceLayer model:
> unique_together = (('sourcetype', 'apiurl'), )
>
> Looks like you have duplicate apiurls in your config.
>

Yah you are right. So I cleaned up sqlite db. And restarted toaster,
without importing toaster's default config. And then tried with my changes
and its nice to see, changes getting included. I have attached the
screenshot. Thanks Ed for the valuable support.



>
> Regards,
> Ed
>
> > ----------
> > (venv)sujith at kdekidd0:~/MEL/toaster_MEL$
> > ./poky/bitbake/lib/toaster/manage.py loadconf
> > /home/sujith/MEL/toaster_MEL/meta-mentor/toasterconf.json
> > Traceback (most recent call last):
> >   File "./poky/bitbake/lib/toaster/manage.py", line 10, in <module>
> >     execute_from_command_line(sys.argv)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py",
> > line 399, in execute_from_command_line
> >     utility.execute()
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py",
> > line 392, in execute
> >     self.fetch_command(subcommand).run_from_argv(self.argv)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/core/management/base.py",
> > line 242, in run_from_argv
> >     self.execute(*args, **options.__dict__)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/core/management/base.py",
> > line 285, in execute
> >     output = self.handle(*args, **options)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py",
> > line 171, in handle
> >     self._import_layer_config(filepath)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py",
> > line 97, in _import_layer_config
> >     apiurl = apiurl
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/models/manager.py",
> > line 157, in create
> >     return self.get_queryset().create(**kwargs)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/models/query.py",
> > line 319, in create
> >     obj.save(force_insert=True, using=self.db)
> >   File
> > "/home/sujith/MEL/toaster_MEL/poky/bitbake/lib/toaster/orm/models.py",
> line
> > 740, in save
> >     return super(LayerSource, self).save(*args, **kwargs)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/models/base.py",
> > line 545, in save
> >     force_update=force_update, update_fields=update_fields)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-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
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/models/base.py",
> > line 654, in _save_table
> >     result = self._do_insert(cls._base_manager, using, fields, update_pk,
> > raw)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/models/base.py",
> > line 687, in _do_insert
> >     using=using, raw=raw)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/models/manager.py",
> > line 232, in _insert
> >     return insert_query(self.model, objs, fields, **kwargs)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/models/query.py",
> > line 1511, in insert_query
> >     return query.get_compiler(using=using).execute_sql(return_id)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
> > line 898, in execute_sql
> >     cursor.execute(sql, params)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/backends/util.py",
> > line 69, in execute
> >     return super(CursorDebugWrapper, self).execute(sql, params)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/backends/util.py",
> > line 53, in execute
> >     return self.cursor.execute(sql, params)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/utils.py",
> > line 99, in __exit__
> >     six.reraise(dj_exc_type, dj_exc_value, traceback)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/backends/util.py",
> > line 53, in execute
> >     return self.cursor.execute(sql, params)
> >   File
> >
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
> > line 450, in execute
> >     return Database.Cursor.execute(self, query, params)
> > django.db.utils.IntegrityError: UNIQUE constraint failed:
> > orm_layersource.name
> > (venv)sujith at kdekidd0:~/MEL/toaster_MEL$
> > ----------
> >
> > >
> > >
> > >> Regards,
> > >> Ed
> > >>
> > >>
> > >> On Fri, Aug 07, 2015 at 02:24:44PM +0530, sujith h wrote:
> > >> > On Thu, Aug 6, 2015 at 6:11 PM, sujith h <sujith.h at gmail.com>
> wrote:
> > >> >
> > >> > > Hi all,
> > >> > >
> > >> > > At Mentor we provide already cloned layers ( like poky,
> meta-mentor
> > >> etc ).
> > >> > > In meta-mentor layer we have a setup-environment script which when
> > >> run from
> > >> > > command line along with arguments like machine name ( eg: qemuarm,
> > >> minnow
> > >> > > etc ) would create a build folder with local.conf and
> bblayers.conf.
> > >> The
> > >> > > bblayers.conf will include all the layers which are dependent for
> > >> machine
> > >> > > to be built. So I was thinking of creating a separate
> > >> toasterconf.json file
> > >> > > for meta-mentor so that it will include all the layers which are
> > >> required
> > >> > > for us to use toaster.
> > >> > >
> > >> > > So my query here is, should I add toasterconf.json file in
> meta-mentor
> > >> > > layer so that toaster can pick it up? Or should it be in a
> different
> > >> > > location which toaster can read it from there.
> > >> > >
> > >> > >
> > >> > > Let me know if my query needs more inputs.
> > >> > >
> > >> >
> > >> > I figured out a way to use toasterconf.json file which I created in
> > >> > meta-mentor layer, using command:
> > >> > ---------
> > >> > ./poky/bitbake/lib/toaster/manage.py loadconf
> > >> meta-mentor/toasterconf.json
> > >> > ---------
> > >> >
> > >> >
> > >> > When I execute the above command below is the error I get:
> > >> >
> > >> > --------------
> > >> > (venv)sujith at kdekidd0:~/MEL/toaster_MEL$
> > >> > ./poky/bitbake/lib/toaster/manage.py loadconf
> > >> meta-mentor/toasterconf.json
> > >> > Traceback (most recent call last):
> > >> >   File "./poky/bitbake/lib/toaster/manage.py", line 10, in <module>
> > >> >     execute_from_command_line(sys.argv)
> > >> >   File
> > >> >
> > >>
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py",
> > >> > line 399, in execute_from_command_line
> > >> >     utility.execute()
> > >> >   File
> > >> >
> > >>
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py",
> > >> > line 392, in execute
> > >> >     self.fetch_command(subcommand).run_from_argv(self.argv)
> > >> >   File
> > >> >
> > >>
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/core/management/base.py",
> > >> > line 242, in run_from_argv
> > >> >     self.execute(*args, **options.__dict__)
> > >> >   File
> > >> >
> > >>
> "/home/sujith/MEL/toaster_MEL/venv/local/lib/python2.7/site-packages/django/core/management/base.py",
> > >> > line 285, in execute
> > >> >     output = self.handle(*args, **options)
> > >> >   File
> > >> >
> > >>
> "/home/sujith/MEL/toaster_MEL/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py",
> > >> > line 171, in handle
> > >> >     self._import_layer_config(filepath)
> > >> >   File
> > >> >
> > >>
> "/home/sujith/MEL/toaster_MEL/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py",
> > >> > line 71, in _import_layer_config
> > >> >     bvo.giturl = _read_git_url_from_local_repository(bvi['giturl'])
> > >> >   File
> > >> >
> > >>
> "/home/sujith/MEL/toaster_MEL/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py",
> > >> > line 62, in _read_git_url_from_local_repository
> > >> >     raise Exception("Error while looking for remote \"%s\" in
> \"%s\"" %
> > >> > (remote_name, out))
> > >> > Exception: Error while looking for remote "origin" in "mel    ssh://
> > >> > git at github.com/MentorEmbedded/meta-mentor.git (fetch)
> > >> > mel    ssh://git@github.com/MentorEmbedded/meta-mentor.git (push)
> > >> > "
> > >> > (venv)sujith at kdekidd0:~/MEL/toaster_MEL$
> > >> > --------------
> > >> >
> > >> > The reason I believe is its checking for origin in the git branch
> > >> output.
> > >> > When I execute 'git branch -a' in meta-mentor layer we have, I get:
> > >> >
> > >> > ------------
> > >> > sujith at kdekidd0:~/MEL/toaster_MEL/meta-mentor$ git branch -a
> > >> > * (no branch)
> > >> >   remotes/m/master -> mel/master
> > >> >   remotes/mel/daisy
> > >> >   remotes/mel/danny
> > >> >   remotes/mel/dylan
> > >> >   remotes/mel/fix-parse-cache-issue
> > >> >   remotes/mel/layerscape
> > >> >   remotes/mel/master
> > >> >   remotes/mel/meibp/2013
> > >> >   remotes/mel/mentor/atp
> > >> >   remotes/mel/mentor/mel6
> > >> >   remotes/mel/merge-and-update-master
> > >> >   remotes/mel/release/2013.11
> > >> >   remotes/mel/release/2013.11-adit
> > >> >   remotes/mel/release/2014.05
> > >> >   remotes/mel/release/2014.05-async1
> > >> >   remotes/mel/release/2014.05-async1-lite
> > >> >   remotes/mel/release/2014.05-async2
> > >> >   remotes/mel/release/2014.05_fastboot_addon
> > >> >   remotes/mel/release/2014.12
> > >> >   remotes/mel/release/2014.12-async1
> > >> >   remotes/mel/release/2014.12-birch
> > >> >   remotes/mel/revert-471-sysroot-stage-dirs-undefined
> > >> >   remotes/mel/sb-2727
> > >> > sujith at kdekidd0:~/MEL/toaster_MEL/meta-mentor$
> > >> > ------------
> > >> >
> > >> > Now this is another twist, which I would have to solve.
> > >> >
> > >> >
> > >> > --
> > >> > സുജിത് ഹരിദാസന്
> > >> > Bangalore
> > >> > <Project>Contributor to KDE project
> > >> > http://fci.wikia.com/wiki/Anti-DRM-Campaign
> > >> > <Blog> http://sujithh.info
> > >>
> > >> > --
> > >> > _______________________________________________
> > >> > toaster mailing list
> > >> > toaster at yoctoproject.org
> > >> > https://lists.yoctoproject.org/listinfo/toaster
> > >>
> > >>
> > >> --
> > >> --
> > >> Regards,
> > >> Ed
> > >>
> > >
> > >
> > >
> > > --
> > > സുജിത് ഹരിദാസന്
> > > Bangalore
> > > <Project>Contributor to KDE project
> > > http://fci.wikia.com/wiki/Anti-DRM-Campaign
> > > <Blog> http://sujithh.info
> > >
> >
> >
> >
> > --
> > സുജിത് ഹരിദാസന്
> > Bangalore
> > <Project>Contributor to KDE project
> > http://fci.wikia.com/wiki/Anti-DRM-Campaign
> > <Blog> http://sujithh.info
>
> --
> --
> Regards,
> Ed
>



-- 
സുജിത് ഹരിദാസന്
Bangalore
<Project>Contributor to KDE project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20150807/4aa784cf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toaster_Mentor.png
Type: image/png
Size: 182693 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20150807/4aa784cf/attachment-0001.png>


More information about the toaster mailing list