summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cookerdata.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-18 22:28:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-21 08:41:11 +0100
commit4602408c69132315c3784718fe4ce155b12464cf (patch)
tree2262f6d8b5e89930b4da4efd72e226ae8f740611 /bitbake/lib/bb/cookerdata.py
parent21a19e0e0bf1b39969f6f2ec37a5784d0069715b (diff)
downloadpoky-4602408c69132315c3784718fe4ce155b12464cf.tar.gz
bitbake: server: Rework the server API so process and xmlrpc servers coexist
This changes the way bitbake server works quite radically. Now, the server is always a process based server with the option of starting an XMLRPC listener on a specific inferface/port. Behind the scenes this is done with a "bitbake.sock" file alongside the bitbake.lock file. If we can obtain the lock, we know we need to start a server. The server always listens on the socket and UIs can then connect to this. UIs connect by sending a set of three file descriptors over the domain socket, one for sending commands, one for receiving command results and the other for receiving events. These changes meant we can throw away all the horrid server abstraction code, the plugable transport option to bitbake and the code becomes much more readable and debuggable. It also likely removes a ton of ways you could hang the UI/cooker in weird ways due to all the race conditions that existed with previous processes. Changes: * The foreground option for bitbake-server was dropped. Just tail the log if you really want this, the codepaths were complicated enough without adding one for this. * BBSERVER="autodetect" was dropped. The server will autostart and autoconnect in process mode. You have to specify an xmlrpc server address since that can't be autodetected. I can't see a use case for autodetect now. * The transport/servetype option to bitbake was dropped. * A BB_SERVER_TIMEOUT variable is added which allows the server to stay resident for a period of time after the last client disconnects before unloading. This is used if the -T/--idle-timeout option is not passed to bitbake. This change is invasive and may well introduce new issues however I believe the codebase is in a much better position for further development and debugging. (Bitbake rev: 72a3dbe13a23588e24c0baca6d58c35cdeba3f63) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cookerdata.py')
-rw-r--r--bitbake/lib/bb/cookerdata.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 6511dcbfad..d05abfe745 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -76,7 +76,7 @@ class ConfigParameters(object):
76 for o in ["abort", "tryaltconfigs", "force", "invalidate_stamp", 76 for o in ["abort", "tryaltconfigs", "force", "invalidate_stamp",
77 "verbose", "debug", "dry_run", "dump_signatures", 77 "verbose", "debug", "dry_run", "dump_signatures",
78 "debug_domains", "extra_assume_provided", "profile", 78 "debug_domains", "extra_assume_provided", "profile",
79 "prefile", "postfile", "tracking"]: 79 "prefile", "postfile", "tracking", "server_timeout"]:
80 options[o] = getattr(self.options, o) 80 options[o] = getattr(self.options, o)
81 81
82 ret, error = server.runCommand(["updateConfig", options, environment, sys.argv]) 82 ret, error = server.runCommand(["updateConfig", options, environment, sys.argv])
@@ -144,7 +144,8 @@ class CookerConfiguration(object):
144 self.dump_signatures = [] 144 self.dump_signatures = []
145 self.dry_run = False 145 self.dry_run = False
146 self.tracking = False 146 self.tracking = False
147 self.interface = [] 147 self.xmlrpcinterface = []
148 self.server_timeout = None
148 self.writeeventlog = False 149 self.writeeventlog = False
149 self.server_only = False 150 self.server_only = False
150 self.limited_deps = False 151 self.limited_deps = False