All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: toaster@yoctoproject.org
Subject: [PATCH v6 08/41] toaster: remove startBBServer API
Date: Wed, 23 Mar 2016 10:14:59 +0200	[thread overview]
Message-ID: <edb3a1069e9edcb189b5f19aabf144b218e75a83.1458720709.git.ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <cover.1458720709.git.ed.bartosh@linux.intel.com>
In-Reply-To: <cover.1458720709.git.ed.bartosh@linux.intel.com>

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 <ed.bartosh@linux.intel.com>
---
 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 08419f2..7d6abe6 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



  parent reply	other threads:[~2016-03-23 10:36 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23  8:14 [PATCH v6 00/41] per project build directory + build cancel + DL_DIR/SSTATE_DIR Ed Bartosh
2016-03-23  8:14 ` [PATCH v6 01/41] toaster: don't start bitbake server Ed Bartosh
2016-03-23  8:14 ` [PATCH v6 02/41] toaster: get rid of noui option Ed Bartosh
2016-03-23  8:14 ` [PATCH v6 03/41] toaster: set BITBAKE_UI environment variable Ed Bartosh
2016-03-23  8:14 ` [PATCH v6 04/41] toasterui: add brbe parameter to buildinfohelper Ed Bartosh
2016-03-23  8:14 ` [PATCH v6 05/41] uievent: improve BBUIEventQueue code Ed Bartosh
2016-03-23  8:14 ` [PATCH v6 06/41] buildinfohelper: improve handling of providermap Ed Bartosh
2016-03-23  8:14 ` [PATCH v6 07/41] toasterui: fix brbe reporting Ed Bartosh
2016-03-23  8:14 ` Ed Bartosh [this message]
2016-03-23  8:15 ` [PATCH v6 09/41] toaster: remove release API Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 10/41] toaster: add brbe parameter to triggerBuild Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 11/41] toaster: modified setLayers API Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 12/41] toaster: reimplement triggerBuild Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 13/41] toaster: add new parameter to _shellcmd Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 14/41] toaster: stop bitbake server after the build Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 15/41] toaster: update conf/local.conf Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 16/41] toaster: fix jethro build Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 17/41] toaster: use bash explicitly Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 18/41] toasterui: shutdown on BuildCompleted event Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 19/41] toaster: bldcontrol Add forceShutDown function to BitbakeController Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 20/41] toaster: Move xhr calls for starting and stopping builds Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 21/41] toaster: xhr Update the implementation of the build cancellation request Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 22/41] toaster: libtoaster Update implementation of startABuild and cancelABuild Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 23/41] toaster: update BuildEnvironmentController and BitbakeController Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 24/41] toaster: models Add cancelled state to build outcome Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 25/41] toaster: bldcontrol models Add a cancelling state the BuildRequest Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 26/41] buildinfohelper: Add handler for cancelling a build Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 27/41] toaster: tables BuildsTable exclude cancelled builds Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 28/41] toaster: mrb_section template Add build cancel button Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 29/41] toaster: models Exclude the CANCELLED builds from get_number_of_builds Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 30/41] toaster: runbuilds Make runbuilds aware of the build CANCELLED state Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 31/41] toaster: runbuilds Clean up runbuilds Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 32/41] toaster: fix conflicting migrations Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 33/41] toaster: use empty token Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 34/41] toaster: add DL_DIR and SSTATE_DIR to poky toasterconf Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 35/41] toaster: add DL_DIR and SSTATE_DIR to oe toasterconf Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 36/41] toaster: update view to support DL_DIR and SSTATE_DIR Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 37/41] toaster: update projectconf.html for " Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 38/41] toaster: use bitbake from sourcedir/bitbake/bin Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 39/41] toasterui: detect build run start correctly on Jethro Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 40/41] buildinfohelper: fix KeyError Ed Bartosh
2016-03-23  8:15 ` [PATCH v6 41/41] toasterui: fix warning 'Unknown event' Ed Bartosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=edb3a1069e9edcb189b5f19aabf144b218e75a83.1458720709.git.ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=toaster@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.