diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-03 15:20:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-04 16:23:56 +0100 |
commit | 4b9de767f02d504c619582e0d62c9acd3230e76e (patch) | |
tree | 70309fa949bda24c8a5f6ab59e70d335e315b72e /bitbake/lib/bb/server | |
parent | 7c079463c96891f0dbf6d7744c0d6bfe7af1e0ca (diff) | |
download | poky-4b9de767f02d504c619582e0d62c9acd3230e76e.tar.gz |
bitbake: event/server: Add _uiready flag to handle missing error messages
If you start and suspend a bitbake execution so the bitbake lock is held,
then try and run "bitbake -w '' X", you will see bitbake return an error exit
code but print no message about what happened at all.
The reason is that the -w option creates a "UI" which swallows the messages. The
code which handles this exit failure mode thinks a UI has printed the messages
and therefore doesn't do so.
This adds in an extra parameter to the UI registration code so that we
can figure out whether its a primary UI or not and base decisions on whether
to display information on that instead. This fixes the error shown above and
some bizarre failures on the Yocto Project Autobuilder.
[YOCTO #8239]
(Bitbake rev: d1d60a68c2de40c2984d5040d14251c1be121b0b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/server/xmlrpc.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 3198635e2f..f022b86c94 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -97,7 +97,7 @@ class ProcessServer(Process, BaseImplServer): | |||
97 | def run(self): | 97 | def run(self): |
98 | for event in bb.event.ui_queue: | 98 | for event in bb.event.ui_queue: |
99 | self.event_queue.put(event) | 99 | self.event_queue.put(event) |
100 | self.event_handle.value = bb.event.register_UIHhandler(self) | 100 | self.event_handle.value = bb.event.register_UIHhandler(self, True) |
101 | 101 | ||
102 | bb.cooker.server_main(self.cooker, self.main) | 102 | bb.cooker.server_main(self.cooker, self.main) |
103 | 103 | ||
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py index f1a2067246..b7647c198f 100644 --- a/bitbake/lib/bb/server/xmlrpc.py +++ b/bitbake/lib/bb/server/xmlrpc.py | |||
@@ -99,7 +99,7 @@ class BitBakeServerCommands(): | |||
99 | if (self.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]): | 99 | if (self.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]): |
100 | return None | 100 | return None |
101 | 101 | ||
102 | self.event_handle = bb.event.register_UIHhandler(s) | 102 | self.event_handle = bb.event.register_UIHhandler(s, True) |
103 | return self.event_handle | 103 | return self.event_handle |
104 | 104 | ||
105 | def unregisterEventHandler(self, handlerNum): | 105 | def unregisterEventHandler(self, handlerNum): |