Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 642B2E00C1E; Mon, 1 Feb 2016 06:31:00 -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 * [134.134.136.24 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id CDFF6E00C1F for ; Mon, 1 Feb 2016 06:30:56 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 01 Feb 2016 06:30:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,380,1449561600"; d="scan'208";a="905881331" Received: from unknown (HELO lp.ger.corp.intel.com) ([10.252.22.6]) by fmsmga002.fm.intel.com with ESMTP; 01 Feb 2016 06:30:54 -0800 From: Elliot Smith To: toaster@yoctoproject.org Date: Mon, 1 Feb 2016 14:30:41 +0000 Message-Id: <1454337042-14865-3-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1454337042-14865-1-git-send-email-elliot.smith@intel.com> References: <1454337042-14865-1-git-send-email-elliot.smith@intel.com> Subject: [review-request][PATCH 2/3] toaster: remove build_name from Build properties 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: Mon, 01 Feb 2016 14:31:00 -0000 This property is never used anywhere in Toaster and only represents an internal bitbake variable. It also makes it more difficult to create a build earlier in the bitbake run, as we don't get access to the build name until the BuildStarted event is fired. Remove redundant property, and the redundant function which refers to it. Signed-off-by: Elliot Smith --- bitbake/lib/bb/ui/buildinfohelper.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 0cb6f68..1533f17 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -133,7 +133,6 @@ class ORMWrapper(object): assert 'distro_version' in build_info assert 'started_on' in build_info assert 'cooker_log_path' in build_info - assert 'build_name' in build_info assert 'bitbake_version' in build_info prj = None @@ -161,7 +160,6 @@ class ORMWrapper(object): build.distro=build_info['distro'] build.distro_version=build_info['distro_version'] build.cooker_log_path=build_info['cooker_log_path'] - build.build_name=build_info['build_name'] build.bitbake_version=build_info['bitbake_version'] build.save() @@ -174,7 +172,6 @@ class ORMWrapper(object): started_on=build_info['started_on'], completed_on=build_info['started_on'], cooker_log_path=build_info['cooker_log_path'], - build_name=build_info['build_name'], bitbake_version=build_info['bitbake_version']) logger.debug(1, "buildinfohelper: build is created %s" % build) @@ -797,7 +794,6 @@ class BuildInfoHelper(object): build_info['started_on'] = timezone.now() build_info['completed_on'] = timezone.now() build_info['cooker_log_path'] = build_log_path - build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0] build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0] build_info['brbe'] = self.server.runCommand(["getVariable", "TOASTER_BRBE"])[0] build_info['project'] = self.project = self.server.runCommand(["getVariable", "TOASTER_PROJECT"])[0] @@ -864,26 +860,6 @@ class BuildInfoHelper(object): return recipe_info - def _get_path_information(self, task_object): - assert isinstance(task_object, Task) - build_stats_format = "{tmpdir}/buildstats/{buildname}/{package}/" - build_stats_path = [] - - for t in self.internal_state['targets']: - buildname = self.internal_state['build'].build_name - pe, pv = task_object.recipe.version.split(":",1) - if len(pe) > 0: - package = task_object.recipe.name + "-" + pe + "_" + pv - else: - package = task_object.recipe.name + "-" + pv - - build_stats_path.append(build_stats_format.format(tmpdir=self.tmp_dir, - buildname=buildname, - package=package)) - - return build_stats_path - - ################################ ## external available methods to store information @staticmethod -- 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.