[bitbake-devel] [WIP][RFC PATCH 5/5] bitbake: main: make observe-only work without --bind

Robert Yang liezhi.yang at windriver.com
Tue Aug 8 09:12:09 UTC 2017


The bitbake --server-only can work without --bind, so --observe-only should also
can work without --bind or --remote-server.

And also allow the connection all the time, otherwise --observe-only doesn't
work.

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 bitbake/lib/bb/main.py           | 4 ----
 bitbake/lib/bb/server/process.py | 8 ++------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index 57b4d7688d9..4477d9c5998 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -357,10 +357,6 @@ def bitbake_main(configParams, configuration):
                                   ("the BBSERVER environment variable" if "BBSERVER" in os.environ \
                                    else "the '--remote-server' option"))
 
-    if configParams.observe_only and not (configParams.remote_server or configParams.bind):
-        raise BBMainException("FATAL: '--observe-only' can only be used by UI clients "
-                              "connecting to a server.\n")
-
     if "BBDEBUG" in os.environ:
         level = int(os.environ["BBDEBUG"])
         if level > configuration.debug:
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 338c44835e1..7f81996246e 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -137,12 +137,8 @@ class ProcessServer(multiprocessing.Process):
         while not self.quit:
             if self.sock in ready:
                 self.controllersock, address = self.sock.accept()
-                if self.haveui:
-                    print("Dropping connection attempt as we have a UI %s" % (str(ready)))
-                    self.controllersock.close()
-                else:
-                    print("Accepting %s" % (str(ready)))
-                    fds.append(self.controllersock)
+                print("Accepting %s" % (str(ready)))
+                fds.append(self.controllersock)
             if self.controllersock in ready:
                 try:
                     print("Connecting Client")
-- 
2.11.0




More information about the bitbake-devel mailing list