Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 0E818E00D34; Fri, 19 Feb 2016 06:49:26 -0800 (PST) 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 * [192.55.52.88 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 3200EE00D37 for ; Fri, 19 Feb 2016 06:49:25 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 19 Feb 2016 06:49:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,470,1449561600"; d="scan'208";a="889608435" Received: from cbyrne3-mobl2.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.31.22]) by orsmga001.jf.intel.com with ESMTP; 19 Feb 2016 06:49:24 -0800 From: Elliot Smith To: toaster@yoctoproject.org Date: Fri, 19 Feb 2016 14:49:11 +0000 Message-Id: <1455893353-15024-4-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1455893353-15024-1-git-send-email-elliot.smith@intel.com> References: <1455893353-15024-1-git-send-email-elliot.smith@intel.com> Subject: [PATCH 3/5] toaster: when updating task stats, task must exist X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2016 14:49:26 -0000 Ensure that a task exists when we're updating its buildstats. This is to prevent duplicate tasks being created when updating buildstats (which is what was happening before, causing the buildstats to be attached to tasks which weren't associated with the build). [YOCTO #8842] Signed-off-by: Elliot Smith --- 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 2b5d312..5f079d1 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -1109,7 +1109,8 @@ class BuildInfoHelper(object): task_information['disk_io'] = taskstats['disk_io'] if 'elapsed_time' in taskstats: task_information['elapsed_time'] = taskstats['elapsed_time'] - self.orm_wrapper.get_update_task_object(task_information) + + self.orm_wrapper.get_update_task_object(task_information, True) def update_and_store_task(self, event): assert 'taskfile' in vars(event) -- Elliot Smith Software Engineer Intel OTC --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.