diff options
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 29 |
2 files changed, 29 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 491fd1566d..1096ccf4de 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -1114,7 +1114,8 @@ class BuildInfoHelper(object): | |||
1114 | be.save() | 1114 | be.save() |
1115 | br = BuildRequest.objects.get(pk = br_id) | 1115 | br = BuildRequest.objects.get(pk = br_id) |
1116 | if errorcode == 0: | 1116 | if errorcode == 0: |
1117 | br.state = BuildRequest.REQ_COMPLETED | 1117 | # request archival of the project artifacts |
1118 | br.state = BuildRequest.REQ_ARCHIVE | ||
1118 | else: | 1119 | else: |
1119 | br.state = BuildRequest.REQ_FAILED | 1120 | br.state = BuildRequest.REQ_FAILED |
1120 | br.save() | 1121 | br.save() |
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index a85ad5a06a..df9f362284 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py | |||
@@ -58,7 +58,12 @@ def _log_settings_from_server(server): | |||
58 | if error: | 58 | if error: |
59 | logger.error("Unable to get the value of BBINCLUDELOGS_LINES variable: %s" % error) | 59 | logger.error("Unable to get the value of BBINCLUDELOGS_LINES variable: %s" % error) |
60 | raise BaseException(error) | 60 | raise BaseException(error) |
61 | return includelogs, loglines | 61 | consolelogfile, error = server.runCommand(["getVariable", "BB_CONSOLELOG"]) |
62 | if error: | ||
63 | logger.error("Unable to get the value of BB_CONSOLELOG variable: %s" % error) | ||
64 | raise BaseException(error) | ||
65 | return includelogs, loglines, consolelogfile | ||
66 | |||
62 | 67 | ||
63 | def main(server, eventHandler, params ): | 68 | def main(server, eventHandler, params ): |
64 | 69 | ||
@@ -71,7 +76,7 @@ def main(server, eventHandler, params ): | |||
71 | console.setFormatter(format) | 76 | console.setFormatter(format) |
72 | logger.addHandler(console) | 77 | logger.addHandler(console) |
73 | 78 | ||
74 | includelogs, loglines = _log_settings_from_server(server) | 79 | includelogs, loglines, consolelogfile = _log_settings_from_server(server) |
75 | 80 | ||
76 | # verify and warn | 81 | # verify and warn |
77 | build_history_enabled = True | 82 | build_history_enabled = True |
@@ -96,6 +101,16 @@ def main(server, eventHandler, params ): | |||
96 | 101 | ||
97 | buildinfohelper = BuildInfoHelper(server, build_history_enabled) | 102 | buildinfohelper = BuildInfoHelper(server, build_history_enabled) |
98 | 103 | ||
104 | if buildinfohelper.brbe is not None and consolelogfile: | ||
105 | # if we are under managed mode we have no other UI and we need to write our own file | ||
106 | bb.utils.mkdirhier(os.path.dirname(consolelogfile)) | ||
107 | conlogformat = bb.msg.BBLogFormatter(format_str) | ||
108 | consolelog = logging.FileHandler(consolelogfile) | ||
109 | bb.msg.addDefaultlogFilter(consolelog) | ||
110 | consolelog.setFormatter(conlogformat) | ||
111 | logger.addHandler(consolelog) | ||
112 | |||
113 | |||
99 | while True: | 114 | while True: |
100 | try: | 115 | try: |
101 | event = eventHandler.waitEvent(0.25) | 116 | event = eventHandler.waitEvent(0.25) |
@@ -115,8 +130,12 @@ def main(server, eventHandler, params ): | |||
115 | 130 | ||
116 | if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)): | 131 | if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)): |
117 | buildinfohelper.update_and_store_task(event) | 132 | buildinfohelper.update_and_store_task(event) |
133 | logger.warn("Logfile for task %s" % event.logfile) | ||
118 | continue | 134 | continue |
119 | 135 | ||
136 | if isinstance(event, bb.build.TaskBase): | ||
137 | logger.info(event._message) | ||
138 | |||
120 | if isinstance(event, bb.event.LogExecTTY): | 139 | if isinstance(event, bb.event.LogExecTTY): |
121 | logger.warn(event.msg) | 140 | logger.warn(event.msg) |
122 | continue | 141 | continue |
@@ -162,7 +181,12 @@ def main(server, eventHandler, params ): | |||
162 | if isinstance(event, bb.event.CacheLoadCompleted): | 181 | if isinstance(event, bb.event.CacheLoadCompleted): |
163 | continue | 182 | continue |
164 | if isinstance(event, bb.event.MultipleProviders): | 183 | if isinstance(event, bb.event.MultipleProviders): |
184 | logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "", | ||
185 | event._item, | ||
186 | ", ".join(event._candidates)) | ||
187 | logger.info("consider defining a PREFERRED_PROVIDER entry to match %s", event._item) | ||
165 | continue | 188 | continue |
189 | |||
166 | if isinstance(event, bb.event.NoProvider): | 190 | if isinstance(event, bb.event.NoProvider): |
167 | return_value = 1 | 191 | return_value = 1 |
168 | errors = errors + 1 | 192 | errors = errors + 1 |
@@ -229,6 +253,7 @@ def main(server, eventHandler, params ): | |||
229 | buildinfohelper.store_log_event(event) | 253 | buildinfohelper.store_log_event(event) |
230 | errors += 1 | 254 | errors += 1 |
231 | errorcode = 1 | 255 | errorcode = 1 |
256 | logger.error("Command execution failed: %s", event.error) | ||
232 | 257 | ||
233 | buildinfohelper.update_build_information(event, errors, warnings, taskfailures) | 258 | buildinfohelper.update_build_information(event, errors, warnings, taskfailures) |
234 | buildinfohelper.close(errorcode) | 259 | buildinfohelper.close(errorcode) |