diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2011-11-28 14:32:40 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-24 18:04:27 +0000 |
commit | 656f9a07588cc00704825a78de9649ca4a1552b8 (patch) | |
tree | 653c7941689599994d5876162c540fb7ee22736e /bitbake/lib/bb/ui/uihelper.py | |
parent | 14df6d53b6856ec78322b9c0ef01e26c0406fe28 (diff) | |
download | ast2050-yocto-poky-656f9a07588cc00704825a78de9649ca4a1552b8.zip ast2050-yocto-poky-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.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/uihelper.py b/bitbake/lib/bb/ui/uihelper.py index 617d60d..bbf5135 100644 --- a/bitbake/lib/bb/ui/uihelper.py +++ b/bitbake/lib/bb/ui/uihelper.py @@ -40,3 +40,45 @@ class BBUIHelper: def getTasks(self): self.needUpdate = False return (self.running_tasks, self.failed_tasks) + + def findServerDetails(self): + import sys + import optparse + from bb.server.xmlrpc import BitbakeServerInfo, BitBakeServerConnection + host = "" + port = 0 + bind = "" + parser = optparse.OptionParser( + usage = """%prog -H host -P port -B bindaddr""") + + parser.add_option("-H", "--host", help = "Bitbake server's IP address", + action = "store", dest = "host", default = None) + + parser.add_option("-P", "--port", help = "Bitbake server's Port number", + action = "store", dest = "port", default = None) + + parser.add_option("-B", "--bind", help = "Hob2 local bind address", + action = "store", dest = "bind", default = None) + + options, args = parser.parse_args(sys.argv) + for key, val in options.__dict__.items(): + if key == 'host' and val: + host = val + elif key == 'port' and val: + port = int(val) + elif key == 'bind' and val: + bind = val + + if not host or not port or not bind: + parser.print_usage() + sys.exit(1) + + serverinfo = BitbakeServerInfo(host, port) + clientinfo = (bind, 0) + connection = BitBakeServerConnection(serverinfo, clientinfo) + + server = connection.connection + eventHandler = connection.events + + return server, eventHandler, host, bind + |