Fix XML-RPC server and Goggle UI
cover Fix XML-RPC server and Goggle UI
This series contains two important fixes and two trivial UI enhancements.
With this series the XML-RPC server now works correctly and the goggle UI has a subtle, long-standing, bug fixed.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: josh/umm
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=josh/umm
Thanks,
Joshua Lock <[email protected]>
---
Joshua Lock (4):
bitbake/uievent: fix queueing of events for xmlrpc before UI has
loaded
bitbake/goggle: closing the progress dialog kills the UI bitbake/depexp: closing progress dialog kills gui bitbake/goggle: don't drop events
bitbake/lib/bb/ui/depexp.py | 1 + bitbake/lib/bb/ui/goggle.py | 3 ++- bitbake/lib/bb/ui/uievent.py | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.3.4
PATCH 1/4 bitbake/uievent: fix queueing of events for xmlrpc before UI has loaded
The recent change to Queue up events before the UI is spawned (in 26eda933379801ef1c8b4b09e67d14f498cd3813) broke the xmlrpc server because the uievent implementation of BBUIEventQueue expects pickled strings for its queue_event() method.
This is because the RPC exposed event.send() method must accept pickled strings, but for xmlrpc event.send() is just mapped to queue_event().
Work around this by adding a send_event method which unpickles strings and hands them off to queue_event() which can then be used for the remapping.
--- bitbake/lib/bb/ui/uievent.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
bitbake/lib/bb/ui/uievent.py +5 -2
@@ -63,17 +63,20 @@ class BBUIEventQueue: def queue_event(self, event): self.eventQueueLock.acquire() - self.eventQueue.append(pickle.loads(event)) + self.eventQueue.append(event) self.eventQueueNotify.set() self.eventQueueLock.release() + def send_event(self, event): + self.queue_event(pickle.loads(event)) + def startCallbackHandler(self): server = UIXMLRPCServer() self.host, self.port = server.socket.getsockname() server.register_function( self.system_quit, "event.quit" ) - server.register_function( self.queue_event, "event.send" ) + server.register_function( self.send_event, "event.send" ) server.socket.settimeout(1) self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port)
Signature · 1 line
1.7.3.4
PATCH 2/4 bitbake/goggle: closing the progress dialog kills the UI
In reply to Joshua LockIt's unlikely that someone wants to close the progress dialog yet leave the UI (and BitBake process) running, so hook up the progress dialogs delete-event to exit gtk.
--- bitbake/lib/bb/ui/goggle.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
bitbake/lib/bb/ui/goggle.py +1 -0
@@ -70,6 +70,7 @@ def main (server, eventHandler): window = MainWindow () window.show_all () pbar = ProgressBar(window) + pbar.connect("delete-event", gtk.main_quit) # Create the object for the current build running_build = RunningBuild ()
Signature · 1 line
1.7.3.4
PATCH 4/4 bitbake/goggle: don't drop events
In reply to Joshua LockWe had a logic inversion that meant we where dropping quite a significant number of events on the floor.... Fixed!
--- bitbake/lib/bb/ui/goggle.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
bitbake/lib/bb/ui/goggle.py +1 -1
@@ -32,8 +32,8 @@ def event_handle_idle_func (eventHandler, build, pbar): # Consume as many messages as we can in the time available to us event = eventHandler.getEvent() while event: - event = eventHandler.getEvent() build.handle_event (event, pbar) + event = eventHandler.getEvent() return True
Signature · 1 line
1.7.3.4
PATCH 3/4 bitbake/depexp: closing progress dialog kills gui
In reply to Joshua LockIt seems safe to assume a user hitting the close button on the dialog wants to kill the whole UI.
--- bitbake/lib/bb/ui/depexp.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
bitbake/lib/bb/ui/depexp.py +1 -0
@@ -218,6 +218,7 @@ def main(server, eventHandler): gtk.gdk.threads_enter() dep = DepExplorer() pbar = ProgressBar(dep) + pbar.connect("delete-event", gtk.main_quit) gtk.gdk.threads_leave() progress_total = 0
Signature · 1 line
1.7.3.4
Richard Purdie
AppliedQuoted 11 lines · Joshua Lock
This series contains two important fixes and two trivial UI enhancements.
With this series the XML-RPC server now works correctly and the goggle UI has a subtle, long-standing, bug fixed.
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: josh/umm
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=josh/ummThanks,
Joshua Lock <[email protected]>
Merged into master, thanks!
Richard