From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id ECDB6E00B9C; Wed, 16 Mar 2016 07:26:27 -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: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.65 listed in list.dnswl.org] Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 2DFD3E00B9C for ; Wed, 16 Mar 2016 07:26:25 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 16 Mar 2016 07:26:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,345,1455004800"; d="scan'208";a="925375406" Received: from linux.intel.com ([10.23.219.25]) by fmsmga001.fm.intel.com with ESMTP; 16 Mar 2016 07:26:24 -0700 Received: from vmed.fi.intel.com (vmed.fi.intel.com [10.237.72.51]) by linux.intel.com (Postfix) with ESMTP id 55C246A4006 for ; Wed, 16 Mar 2016 08:14:09 -0700 (PDT) From: Ed Bartosh To: toaster@yoctoproject.org Date: Wed, 16 Mar 2016 14:05:27 +0200 Message-Id: <8fa1fcbecb84013040f47273986cd26bcb4011d7.1458127353.git.ed.bartosh@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH v5 08/19] toaster: remove startBBServer API 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: Wed, 16 Mar 2016 14:26:28 -0000 We still will have to run bitbake server, but it will be done different way and the code will be in triggerBuild function. Removed startBBServer API from BuildEnvironmentController and LocalhostBEController classes. Signed-off-by: Ed Bartosh --- bitbake/lib/toaster/bldcontrol/bbcontroller.py | 9 ------ .../toaster/bldcontrol/localhostbecontroller.py | 32 ---------------------- 2 files changed, 41 deletions(-) diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py index f40103c..535a398 100644 --- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py +++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py @@ -127,14 +127,6 @@ class BuildEnvironmentController(object): bblayerconffile.write("# line added by toaster build control\nBBLAYERS = \"" + " ".join(layerlist) + "\"") bblayerconffile.close() - def startBBServer(self): - """ Starts a BB server with Toaster toasterui set up to record the builds, an no controlling UI. - After this method executes, self.be bbaddress/bbport MUST point to a running and free server, - and the bbstate MUST be updated to "started". - """ - raise NotImplementedError("FIXME: Must override in order to actually start the BB server") - - def setLayers(self, bitbake, ls): """ Checks-out bitbake executor and layers from git repositories. Sets the layer variables in the config file, after validating local layer paths. @@ -151,7 +143,6 @@ class BuildEnvironmentController(object): starts if needed; or reconnects to the server if we can """ if not self.connection: - self.startBBServer() self.be.lock = BuildEnvironment.LOCK_RUNNING self.be.save() diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index efd82c3..9027291 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -70,38 +70,6 @@ class LocalhostBEController(BuildEnvironmentController): logger.debug("localhostbecontroller: shellcmd success") return out - def startBBServer(self): - assert self.pokydirname and os.path.exists(self.pokydirname) - assert self.islayerset - - # find our own toasterui listener/bitbake - from toaster.bldcontrol.management.commands.loadconf import _reduce_canon_path - - toaster = _reduce_canon_path(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../bin/toaster")) - assert os.path.exists(toaster) and os.path.isfile(toaster) - - # restart bitbake server and toastergui observer - self._shellcmd("bash -c 'source %s restart-bitbake'" % toaster, self.be.builddir) - logger.debug("localhostbecontroller: restarted bitbake server") - - # read port number from bitbake.lock - self.be.bbport = "" - bblock = os.path.join(self.be.builddir, 'bitbake.lock') - if os.path.exists(bblock): - with open(bblock) as fplock: - for line in fplock: - if ":" in line: - self.be.bbport = line.split(":")[-1].strip() - logger.debug("localhostbecontroller: bitbake port %s", self.be.bbport) - break - - if not self.be.bbport: - raise BuildSetupException("localhostbecontroller: can't read bitbake port from %s" % bblock) - - self.be.bbaddress = "localhost" - self.be.bbstate = BuildEnvironment.SERVER_STARTED - self.be.save() - def getGitCloneDirectory(self, url, branch): """Construct unique clone directory name out of url and branch.""" if branch != "HEAD": -- 2.1.4