summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-08 09:34:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-08 11:37:26 +0100
commitcd3c4292e7ccc8934f229fcf010f8615398b87b5 (patch)
tree0c9cbf81048e4b44bc613f78cd6d59f0d9400b2e /bitbake/bin
parente386fe4542865119ae7e1574e260c037e926239e (diff)
downloadast2050-yocto-poky-cd3c4292e7ccc8934f229fcf010f8615398b87b5.zip
ast2050-yocto-poky-cd3c4292e7ccc8934f229fcf010f8615398b87b5.tar.gz
bitbake: Cleanup bitbake server init process to be clearer to follow
Create a standard format server class instance with method calls for each step in the server setup. There should be enough hooks for each of the different server types. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake23
1 files changed, 14 insertions, 9 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index acd0867..8f2fece 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -40,7 +40,7 @@ from bb import cooker
from bb import ui
from bb import server
from bb.server import none
-#from bb.server import xmlrpc
+from bb.server import xmlrpc
__version__ = "1.13.0"
logger = logging.getLogger("BitBake")
@@ -173,9 +173,6 @@ Default BBFILES are the .bb files in the current directory.""")
ui_main = get_ui(configuration)
- #server = bb.server.xmlrpc
- server = bb.server.none
-
# Save a logfile for cooker into the current working directory. When the
# server is daemonized this logfile will be truncated.
cooker_logfile = os.path.join(os.getcwd(), "cooker.log")
@@ -192,21 +189,29 @@ Default BBFILES are the .bb files in the current directory.""")
# of the UIs (e.g. for DISPLAY, etc.)
bb.utils.clean_environment()
- cooker = bb.cooker.BBCooker(configuration, server)
+ #server = bb.server.xmlrpc.BitBakeServer()
+ server = bb.server.none.BitBakeServer()
+
+ server.initServer()
+ idle = server.getServerIdleCB()
+
+ cooker = bb.cooker.BBCooker(configuration, idle)
cooker.parseCommandLine()
- serverinfo = server.BitbakeServerInfo(cooker.server)
+ server.addcooker(cooker)
+ server.saveConnectionDetails()
+ server.detach(cooker_logfile)
- server.BitBakeServerFork(cooker, cooker.server, serverinfo, cooker_logfile)
+ # Should no longer need to ever reference cooker
del cooker
logger.removeHandler(handler)
# Setup a connection to the server (cooker)
- server_connection = server.BitBakeServerConnection(serverinfo)
+ server_connection = server.establishConnection()
try:
- return server.BitbakeUILauch().launch(serverinfo, ui_main, server_connection.connection, server_connection.events)
+ return server.launchUI(ui_main, server_connection.connection, server_connection.events)
finally:
server_connection.terminate()
OpenPOWER on IntegriCloud