summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/bitbake23
-rw-r--r--lib/bb/ui/depexp.py2
-rw-r--r--lib/bb/ui/goggle.py2
-rw-r--r--lib/bb/ui/knotty.py2
-rw-r--r--lib/bb/ui/ncurses.py2
-rw-r--r--lib/bb/ui/puccho.py2
6 files changed, 10 insertions, 23 deletions
diff --git a/bin/bitbake b/bin/bitbake
index fac2dc2a8..41060ae23 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -40,15 +40,11 @@ from bb import cooker
from bb import ui
from bb import server
from bb.server import none
-#from bb.server import xmlrpc
__version__ = "1.11.0"
logger = logging.getLogger("BitBake")
-#============================================================================#
-# BBOptions
-#============================================================================#
class BBConfiguration(object):
"""
Manages build options and configurations for one run
@@ -89,13 +85,8 @@ warnings.filterwarnings("ignore", category=PendingDeprecationWarning)
warnings.filterwarnings("ignore", category=ImportWarning)
warnings.filterwarnings("ignore", category=DeprecationWarning, module="<string>$")
-#============================================================================#
-# main
-#============================================================================#
def main():
- return_value = 1
-
parser = optparse.OptionParser(
version = "BitBake Build Tool Core version %s, %%prog version %s" % (bb.__version__, __version__),
usage = """%prog [options] [package ...]
@@ -170,7 +161,6 @@ Default BBFILES are the .bb files in the current directory.""")
loghandler = event.LogHandler()
logger.addHandler(loghandler)
- #server = bb.server.xmlrpc
server = bb.server.none
# Save a logfile for cooker into the current working directory. When the
@@ -186,7 +176,6 @@ Default BBFILES are the .bb files in the current directory.""")
bb.utils.clean_environment()
cooker = bb.cooker.BBCooker(configuration, server)
-
cooker.parseCommandLine()
serverinfo = server.BitbakeServerInfo(cooker.server)
@@ -197,7 +186,7 @@ Default BBFILES are the .bb files in the current directory.""")
logger.removeHandler(loghandler)
# Setup a connection to the server (cooker)
- serverConnection = server.BitBakeServerConnection(serverinfo)
+ server_connection = server.BitBakeServerConnection(serverinfo)
# Launch the UI
if configuration.ui:
@@ -210,17 +199,15 @@ Default BBFILES are the .bb files in the current directory.""")
# Dynamically load the UI based on the ui name. Although we
# suggest a fixed set this allows you to have flexibility in which
# ones are available.
- uimodule = __import__("bb.ui", fromlist = [ui])
- ui_init = getattr(uimodule, ui).init
+ module = __import__("bb.ui", fromlist = [ui])
+ ui_main = getattr(module, ui).main
except AttributeError:
print("FATAL: Invalid user interface '%s' specified. " % ui)
print("Valid interfaces are 'ncurses', 'depexp' or the default, 'knotty'.")
else:
- return_value = ui_init(serverConnection.connection, serverConnection.events)
+ return ui_main(server_connection.connection, server_connection.events)
finally:
- serverConnection.terminate()
-
- return return_value
+ server_connection.terminate()
if __name__ == "__main__":
ret = main()
diff --git a/lib/bb/ui/depexp.py b/lib/bb/ui/depexp.py
index 6fd18d168..f0297a3bc 100644
--- a/lib/bb/ui/depexp.py
+++ b/lib/bb/ui/depexp.py
@@ -185,7 +185,7 @@ class gtkthread(threading.Thread):
gtk.main()
gtkthread.quit.set()
-def init(server, eventHandler):
+def main(server, eventHandler):
try:
cmdline = server.runCommand(["getCmdLineAction"])
diff --git a/lib/bb/ui/goggle.py b/lib/bb/ui/goggle.py
index 858ca14c4..40923ba88 100644
--- a/lib/bb/ui/goggle.py
+++ b/lib/bb/ui/goggle.py
@@ -49,7 +49,7 @@ class MainWindow (gtk.Window):
self.set_default_size(640, 480)
scrolled_window.add (self.cur_build_tv)
-def init (server, eventHandler):
+def main (server, eventHandler):
gobject.threads_init()
gtk.gdk.threads_init()
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index dea1fd99a..a60c1853a 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -66,7 +66,7 @@ class BBLogFormatter(logging.Formatter):
else:
return logging.Formatter.format(self, record)
-def init(server, eventHandler):
+def main(server, eventHandler):
# Get values of variables which control our output
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
diff --git a/lib/bb/ui/ncurses.py b/lib/bb/ui/ncurses.py
index 3fed4c58a..3bc837396 100644
--- a/lib/bb/ui/ncurses.py
+++ b/lib/bb/ui/ncurses.py
@@ -324,7 +324,7 @@ class NCursesUI:
shutdown = shutdown + 1
pass
-def init(server, eventHandler):
+def main(server, eventHandler):
if not os.isatty(sys.stdout.fileno()):
print("FATAL: Unable to run 'ncurses' UI without a TTY.")
return
diff --git a/lib/bb/ui/puccho.py b/lib/bb/ui/puccho.py
index a627fc803..3ce4590c1 100644
--- a/lib/bb/ui/puccho.py
+++ b/lib/bb/ui/puccho.py
@@ -390,7 +390,7 @@ def running_build_failed_cb (running_build, manager):
print("build failed")
manager.notify_build_failed ()
-def init (server, eventHandler):
+def main (server, eventHandler):
# Initialise threading...
gobject.threads_init()
gtk.gdk.threads_init()