From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: Michael Wood <michael.g.wood@intel.com>
Cc: toaster@yoctoproject.org
Subject: Re: [PATCH 1/2] toaster: buildinfohelper associate build data with built_recipe
Date: Sat, 10 Oct 2015 16:45:06 +0300 [thread overview]
Message-ID: <20151010134506.GA10399@linux.intel.com> (raw)
In-Reply-To: <1444154621-3888-2-git-send-email-michael.g.wood@intel.com>
Hi Michael,
This change caused below 2 tracebacks in my setup(ed/toaster/8279-v2, toaster
run from scratch: rm toaster.sqlite; . ../bitbake/bin/toaster
ERROR: Cannot assign None: "Task.recipe" does not allow null values.
Traceback (most recent call last):
File "/home/ed/git/yocto/poky/bitbake/lib/bb/ui/toasterui.py", line
248, in main
buildinfohelper.store_started_task(event)
File "/home/ed/git/yocto/poky/bitbake/lib/bb/ui/buildinfohelper.py",
line 1043, in store_started_task
self.orm_wrapper.get_update_task_object(task_information)
File "/home/ed/git/yocto/poky/bitbake/lib/bb/ui/buildinfohelper.py",
line 225, in get_update_task_object
task_name=task_information['task_name']
File "/home/ed/git/yocto/poky/bitbake/lib/bb/ui/buildinfohelper.py",
line 99, in _cached_get_or_create
clazz.objects.get_or_create(**kwargs)
File "/usr/lib/python2.7/site-packages/django/db/models/manager.py",
line 154, in get_or_create
return self.get_queryset().get_or_create(**kwargs)
File "/usr/lib/python2.7/site-packages/django/db/models/query.py",
line 381, in get_or_create
obj = self.model(**params)
File "/home/ed/git/yocto/poky/bitbake/lib/toaster/orm/models.py", line
500, in __init__
super(Task, self).__init__(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line
405, in __init__
setattr(self, field.name, rel_obj)
File
"/usr/lib/python2.7/site-packages/django/db/models/fields/related.py",
line 335, in __set__
(instance._meta.object_name, self.field.name))
ValueError: Cannot assign None: "Task.recipe" does not allow null
values.
Traceback (most recent call last):
File "/home/ed/git/yocto/poky/bitbake/bin/bitbake", line 45, in
<module>
cookerdata.CookerConfiguration()))
File "/home/ed/git/yocto/poky/bitbake/lib/bb/main.py", line 419, in
bitbake_main
return ui_module.main(server_connection.connection,
server_connection.events, configParams)
File "/home/ed/git/yocto/poky/bitbake/lib/bb/ui/toasterui.py", line
368, in main
logger.error("Error data dump %s\n%s\n" ,
traceback.format_tb(curr,1), pformat(curr.tb_frame.f_locals))
File "/usr/lib64/python2.7/pprint.py", line 63, in pformat
return PrettyPrinter(indent=indent, width=width,
depth=depth).pformat(object)
File "/usr/lib64/python2.7/pprint.py", line 122, in pformat
self._format(object, sio, 0, 0, {}, 0)
File "/usr/lib64/python2.7/pprint.py", line 140, in _format
rep = self._repr(object, context, level - 1)
File "/usr/lib64/python2.7/pprint.py", line 226, in _repr
self._depth, level)
File "/usr/lib64/python2.7/pprint.py", line 238, in format
return _safe_repr(object, context, maxlevels, level)
File "/usr/lib64/python2.7/pprint.py", line 282, in _safe_repr
vrepr, vreadable, vrecur = saferepr(v, context, maxlevels, level)
File "/usr/lib64/python2.7/pprint.py", line 323, in _safe_repr
rep = repr(object)
File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line
423, in __repr__
u = six.text_type(self)
File "/home/ed/git/yocto/poky/bitbake/lib/toaster/orm/models.py", line
552, in __unicode__
return "%d(%d) %s:%s" % (self.pk, self.build.pk, self.recipe.name,
self.task_name)
File
"/usr/lib/python2.7/site-packages/django/db/models/fields/related.py",
line 305, in __get__
val = self.field.get_local_related_value(instance)
File
"/usr/lib/python2.7/site-packages/django/db/models/fields/related.py",
line 997, in get_local_related_value
return self.get_instance_value_for_fields(instance,
self.local_related_fields)
File
"/usr/lib/python2.7/site-packages/django/db/models/fields/related.py",
line 1012, in get_instance_value_for_fields
ret.append(getattr(instance, field.attname))
AttributeError: 'Task' object has no attribute 'recipe_id'
I also noticed that progress bar for commandline builds is not shown.
Probably it's caused by above tracebacks.
I removed this change from my branch. If you want to reproduce this
you can get my branch and re-apply it.
Regards,
Ed
On Tue, Oct 06, 2015 at 07:03:40PM +0100, Michael Wood wrote:
> Make sure we associate build data with the built recipe rather than
> toaster's configuration copy of the recipe.
>
> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
> ---
> bitbake/lib/bb/ui/buildinfohelper.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
> index 793418a..9195584 100644
> --- a/bitbake/lib/bb/ui/buildinfohelper.py
> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> @@ -285,6 +285,7 @@ class ORMWrapper(object):
>
> update_recipe_obj(recipe)
>
> + built_recipe = None
> # Create a copy of the recipe for historical puposes and update it
> for built_layer in self.layer_version_built:
> if built_layer.layer == recipe_information['layer_version'].layer:
> @@ -300,7 +301,7 @@ class ORMWrapper(object):
> if created and must_exist:
> raise NotExisting("Recipe object created when expected to exist", recipe_information)
>
> - return recipe
> + return built_recipe
>
> def get_update_layer_version_object(self, build_obj, layer_obj, layer_version_information):
> if isinstance(layer_obj, Layer_Version):
> --
> 2.1.4
>
> --
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
--
--
Regards,
Ed
next prev parent reply other threads:[~2015-10-10 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 18:03 [PATCH 0/2] michaelw/toaster/buildinfo-fixes Michael Wood
2015-10-06 18:03 ` [PATCH 1/2] toaster: buildinfohelper associate build data with built_recipe Michael Wood
2015-10-07 10:01 ` Smith, Elliot
2015-10-07 10:08 ` Smith, Elliot
2015-10-10 13:45 ` Ed Bartosh [this message]
2015-10-06 18:03 ` [PATCH 2/2] toaster: buildinfohelper Skip packages we have no build info about Michael Wood
2015-10-07 10:33 ` [PATCH 0/2] michaelw/toaster/buildinfo-fixes Smith, Elliot
2015-10-07 12:26 ` Barros Pena, Belen
2015-10-07 13:56 ` Smith, Elliot
-- strict thread matches above, loose matches on Subject: below --
2015-10-07 13:54 [PATCH 0/2] toaster: buildinfohelper fixes Elliot Smith
2015-10-07 13:55 ` [PATCH 1/2] toaster: buildinfohelper associate build data with built_recipe Elliot Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151010134506.GA10399@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=michael.g.wood@intel.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.