From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 4495EE00B81; Sat, 10 Oct 2015 06:45:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.20 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id A3202E0048C for ; Sat, 10 Oct 2015 06:45:12 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 10 Oct 2015 06:45:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,663,1437462000"; d="scan'208";a="823644032" Received: from linux.intel.com ([10.23.219.25]) by orsmga002.jf.intel.com with ESMTP; 10 Oct 2015 06:45:11 -0700 Received: from linux.intel.com (vmed.fi.intel.com [10.237.72.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTP id 6FF7C6A4005; Sat, 10 Oct 2015 06:44:13 -0700 (PDT) Date: Sat, 10 Oct 2015 16:45:06 +0300 From: Ed Bartosh To: Michael Wood Message-ID: <20151010134506.GA10399@linux.intel.com> References: <1444154621-3888-1-git-send-email-michael.g.wood@intel.com> <1444154621-3888-2-git-send-email-michael.g.wood@intel.com> MIME-Version: 1.0 In-Reply-To: <1444154621-3888-2-git-send-email-michael.g.wood@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toaster@yoctoproject.org Subject: Re: [PATCH 1/2] toaster: buildinfohelper associate build data with built_recipe X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: ed.bartosh@linux.intel.com List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Oct 2015 13:45:16 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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 > --- > 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