summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/uihelper.py
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2011-11-28 14:32:40 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-24 18:04:27 +0000
commit656f9a07588cc00704825a78de9649ca4a1552b8 (patch)
tree653c7941689599994d5876162c540fb7ee22736e /bitbake/lib/bb/ui/uihelper.py
parent14df6d53b6856ec78322b9c0ef01e26c0406fe28 (diff)
downloadpoky-656f9a07588cc00704825a78de9649ca4a1552b8.tar.gz
Hob: A new implemetation (v2)
This commit implements a new design for hob Some of the new features: - Friendly new designed GUI. Quick response to user actions. - Two step builds support package generation and image generation. - Support running GUI seprarately from bitbake server. - Recipe/package selection and deselection. - Accurate customization for image contents and size. - Progress bars showing the parsing and build status. - Load/save user configurations from/into templates. (Bitbake rev: 4dacd29f9c957d20f4583330b51e5420f9c3338d) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Liming An <limingx.l.an@intel.com> Signed-off-by: Fengxia Hua <fengxia.hua@intel.com> Designed-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/uihelper.py')
-rw-r--r--bitbake/lib/bb/ui/uihelper.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/uihelper.py b/bitbake/lib/bb/ui/uihelper.py
index 617d60db82..bbf5135b70 100644
--- a/bitbake/lib/bb/ui/uihelper.py
+++ b/bitbake/lib/bb/ui/uihelper.py
@@ -40,3 +40,45 @@ class BBUIHelper:
40 def getTasks(self): 40 def getTasks(self):
41 self.needUpdate = False 41 self.needUpdate = False
42 return (self.running_tasks, self.failed_tasks) 42 return (self.running_tasks, self.failed_tasks)
43
44 def findServerDetails(self):
45 import sys
46 import optparse
47 from bb.server.xmlrpc import BitbakeServerInfo, BitBakeServerConnection
48 host = ""
49 port = 0
50 bind = ""
51 parser = optparse.OptionParser(
52 usage = """%prog -H host -P port -B bindaddr""")
53
54 parser.add_option("-H", "--host", help = "Bitbake server's IP address",
55 action = "store", dest = "host", default = None)
56
57 parser.add_option("-P", "--port", help = "Bitbake server's Port number",
58 action = "store", dest = "port", default = None)
59
60 parser.add_option("-B", "--bind", help = "Hob2 local bind address",
61 action = "store", dest = "bind", default = None)
62
63 options, args = parser.parse_args(sys.argv)
64 for key, val in options.__dict__.items():
65 if key == 'host' and val:
66 host = val
67 elif key == 'port' and val:
68 port = int(val)
69 elif key == 'bind' and val:
70 bind = val
71
72 if not host or not port or not bind:
73 parser.print_usage()
74 sys.exit(1)
75
76 serverinfo = BitbakeServerInfo(host, port)
77 clientinfo = (bind, 0)
78 connection = BitBakeServerConnection(serverinfo, clientinfo)
79
80 server = connection.connection
81 eventHandler = connection.events
82
83 return server, eventHandler, host, bind
84