Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id CDB7BE00BBF; Fri, 29 Jan 2016 02:29:44 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 8E524E00B9E for ; Fri, 29 Jan 2016 02:29:43 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 29 Jan 2016 02:29:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,363,1449561600"; d="scan'208";a="871591819" Received: from markaphi-mobl2.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.9.230]) by orsmga001.jf.intel.com with ESMTP; 29 Jan 2016 02:29:42 -0800 From: Elliot Smith To: toaster@yoctoproject.org Date: Fri, 29 Jan 2016 10:29:29 +0000 Message-Id: <1454063370-8922-3-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1454063370-8922-1-git-send-email-elliot.smith@intel.com> References: <1454063370-8922-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: Fri, 29 Jan 2016 10:29:44 -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.