summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: lib/bb: support NO_COLORPeter A. Bigot2024-03-221-1/+1
| | | | | | | | | | | | | Red text on a black background can make it difficult for people with visual impairments to read the text of error messages. Respect the presence of a non-empty NO_COLOR environment variable as an indication the user doesn't want colorization to be automatically enabled. See: https://no-color.org/ (Bitbake rev: d9986c54cd3d67ed1f7cb636b17696c8d0d4db85) Signed-off-by: Peter A. Bigot <pab@pabigot.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: taskexp_ncurses: fix execution example in introductory commentUlrich Ölmann2024-02-281-1/+1
| | | | | | | | | | | | | | Drop the ".py" file extension from the "-u" option's argument that has been overlooked while applying the original patch (see [1]) to make the example work. While at it sort the recipes' names consistently with respect to what is found in the self-test examples below. [1] https://lore.kernel.org/bitbake-devel/6f2645a7c4db2ae149d387544d2b94209cfed3f4.camel@linuxfoundation.org/ (Bitbake rev: 1f4d517b7a0389f78d1f791135f8dc9120e9912b) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: taskexp_ncurses: ncurses version of taskexp.pyDavid Reyna2024-02-181-0/+1511
| | | | | | | | | | | | | | | | * Create an ncurses version of the GTK app "taskexp.py". * Add these additional features: - Sort tasks in recipes by their dependency order - Print individual and/or recipe-wide dependencies to a file - Add a wild card filter - Show the target recipes on BOLD * Provide a GUI self test * Provide a non-ncurses self test for ptest (Bitbake rev: f49bec66ad51c8cddeceafbbe2445c46e396ee8b) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/knotty: properly handle exceptions when calling runCommand()Mark Asselstine2024-01-101-10/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | In runCommand() the send() and recv() can fail and raise BrokenPipeError and EOFError exceptions when the bitbake-server is unexpectedly terminated. In these cases a python traceback is currently dumped. Similarly updateFromServer() which calls runCommand() can also raise these and other exceptions, and currently lacks proper exception handling resulting in python traceback. We wrap calls to runCommand() and updateFromServer() in a try/except block as well as improve the exception handling for updateToServer(). This along with the earlier commit which added text to the BrokenPipeError and EOFError exceptions in runCommand() to indicate a bitbake-server termination may have occurred, should improve the user's ability to understand and handle these errors. An easy way to trigger each of the runCommand() exceptions is to 'kill -9' bitbake-server before (causes EOFError) or after (causes BrokenPipeError) the "Loading Cache" stage. (Bitbake rev: 804d366ee3ddc0f37f0a6c712c8d42db45b119bc) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Added new feature to import eventlogs from command line ↵Marlon Rodriguez Garcia2023-12-122-1/+87
| | | | | | | | | | | | | | | | | | | | | | | | into toaster using replay functionality Added a new button on the base template to access a new template. Added a model register the information on the builds and generate access links Added a form to include the option to load specific files Added jquery and ajax functions to block screen and redirect to build page when import eventlogs is trigger Added a new button on landing page linked to import build page, and set min-height of buttons in landing page for uniformity Removed test assertion to check command line build in content, because new button contains text Updated toaster_eventreplay to use library Fix test in test_layerdetails_page Rebased from master This feature uses the value from the variable BB_DEFAULT_EVENTLOG to read the files created by bitbake Exclude listing of files that don't contain the allvariables definitions used to replay builds This part of the feature should be revisited. Over a long period of time, the BB_DEFAULT_EVENTLOG will exponentially increase the size of the log file and cause bottlenecks when importing. (Bitbake rev: ab96cafe03d8bab33c1de09602cc62bd6974f157) Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/ncurses: Add missing function call to avoid tracebackRichard Purdie2023-11-271-0/+3
| | | | | | | | | The ncurses UI wasn't working due to a missing function call. Add it to avoid a traceback when starting builds. (Bitbake rev: db8f36b69a68de2179e5685cf24a42ec10d68257) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: accommodate missing 'Image Name' value in buildinfohelperDavid Reyna2023-08-301-1/+12
| | | | | | | | | | | | | | The value "Image Name" in bitbake events was missing for certain builds. Update 'buildinfohelper' to extract the image name elsewhere in this circumstance and not crash. [YOCTO #13191] (Bitbake rev: 703792c48c818025163de9c2f35f6ac815500607) Signed-off-by: Kieran McNulty <Kieran.McNulty@windriver.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: fix deprecated threading.Thread.setDaemonTim Orling2023-01-242-2/+2
| | | | | | | | | | | | | | | | | Deprecated in Python 3.10: https://docs.python.org/3/whatsnew/3.10.html#deprecated https://github.com/python/cpython/pull/25174 Fixes warnings like: ...bitbake/lib/bb/ui/uievent.py:68: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead self.t.setDaemon(True) (Bitbake rev: 323f6ce27a1bfd7159e72f29684674ff495dedee) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Improve shutdown handlingRichard Purdie2023-01-111-5/+10
| | | | | | | | | | | | There are three levels of shutdown, the initial "wait for current tasks", then "stop current tasks" and "exit now". Change the code so that we don't instantly exit after "stop current tasks" but allow the events to come through from the server first. The new shutdown level allows that to then be broken out of too. (Bitbake rev: af38345b91cfc8a6bb5c38f5753255e7635bfe2b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb: Update thread/process locks to use a timeoutRichard Purdie2023-01-051-18/+10
| | | | | | | | | | | | | | | | | | | | | The thread/process locks we use translate to futexes in Linux. If a process dies holding the lock, anything else trying to take the lock will hang indefinitely. An example would be the OOM killer taking out a parser process. To avoid bitbake processes just hanging indefinitely, add a timeout to our lock calls using a context manager. If we can't obtain the lock after waiting 5 minutes, hard exit out using os._exit(1). Use _exit() to avoid locking in any other places trying to write error messages to event handler queues (which also need locks). Whilst a bit harsh, this should mean we stop having lots of long running processes in cases where things are never going to work out and also avoids hanging builds on the autobuilder. (Bitbake rev: d2a3f662b0eed900fc012a392bfa0a365df0df9b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Ping the server/cooker periodicallyRichard Purdie2022-12-311-1/+11
| | | | | | | | | | We're seeing failures where the UI hangs if the server disappears. Ping the cooker/server if we've not had any events in the last minute so we can check if it is still alive. (Bitbake rev: 6567ad6181f9e39812097f0154647e4b38238fdd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Avoid looping with tracebacksRichard Purdie2022-12-311-3/+1
| | | | | | | | | | If there are events queued and there is an exception in the main loop of the UI code, it will print tracebacks on the console indefinitely. Avoid that by improving the loop exit conditions. (Bitbake rev: 2d0940b920a22b244f3ba6849c7cd019578386b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: Drop unused variablesRichard Purdie2022-04-211-2/+2
| | | | | | (Bitbake rev: d720dfa40620e64a557edef527148d58fcb1d858) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/knotty: Drop pointless pass statementRichard Purdie2022-04-211-1/+0
| | | | | | (Bitbake rev: 625565087d8c9e7a6a79b0b4f3e5be2d77d5f100) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: Drop unused functionRichard Purdie2022-04-211-21/+0
| | | | | | | | | The function has a loop where the variable is never used which I was going to fix but the entire function never seems to be called so remove it entirely. (Bitbake rev: 3bcb20f025907f4e88bbe3d14f5638d5f01010cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/buildinfohelper: Drop unused importRichard Purdie2022-04-211-1/+1
| | | | | | (Bitbake rev: aca0ff85109f4b0f3c201c02c3f59cad7ee2e787) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: Show elapsed time also for tasks with progress barsPeter Kjellerstedt2022-04-051-11/+11
| | | | | | | | | | | While the progress bar is good at conveying information about how much of a task has executed, the elapsed time of the task is still very much relevant to show. (Bitbake rev: 41eeb4f34fb2306303f7688ec5e0ae965a573aa4) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: knotty: reduce keep-alive timeout from 5000s (83 minutes) ↵Ross Burton2022-03-231-3/+4
| | | | | | | | | | | | | | | | to 10 minutes The keep alive timeout is excessively long at 83 minutes (5000 seconds), reduce this to 10 minutes: this should be long enough that it rarely triggers in normal builds, but when it does it has useful information. (Bitbake rev: 2e47346b95b09d7ab8f0603e2d62cfb549dc1f5c) (Bitbake rev: dcf52157d3635925491783be656c6b76d1efe1a4) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: knotty: display active tasks when printing keepAlive() messageRoss Burton2022-03-231-1/+3
| | | | | | | | | | | | | | | | | | | | In interactive bitbake sessions it is obvious what tasks are running when one of them hangs or otherwise takes a long time. However, in non-interactive sessions (such as automated builds) bitbake just prints a message saying that it is "still alive" with no clues as to what tasks are active still. By simply listing the active tasks when printing the keep alive message, we don't need to parse the bitbake log to identify which of the tasks is still active and has presumably hung. (Bitbake rev: f9f57fb7d2c8a13df1eb9d5b9766f15e229dcf97) (Bitbake rev: 30f6c3f175617beea8e8bb75dcf255611e3fc2fd) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: race condition for end-of-buildDavid Reyna2022-03-211-0/+6
| | | | | | | | | | | | | Force a sync point for end-of build event handler force the build's outcome status commit, to resolve a race condition with the build completion takedown. [YOCTO #14765] (Bitbake rev: f76c13536e19d2401365c0fc240ef8dbcb3ee7e8) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: buildinfohelper.py fix for Django 3.2Tim Orling2022-03-151-11/+5
| | | | | | | | | | connection.features.autocommits_when_autocommit_is_off was deprecated in 3.0 and is no longer present in 3.2 (Bitbake rev: cc0f526fb4298349d0eea44c8f35d3dd226cc8d6) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: A little clean up of TerminalFilter::updateFooter()Peter Kjellerstedt2022-03-111-4/+2
| | | | | | | | | | * Use max() to clamp progress to >= 0. * Be consistent when evaluating self.quiet (treat it as a boolean). (Bitbake rev: 160f71372ff93894d9314619e9d3b547c1f3cda3) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: Correct the width of the progress bar for the real tasksPeter Kjellerstedt2022-03-111-5/+14
| | | | | | | | | | | | | | | | | In commit 8055ec36 (knotty: Improve setscene task display) the setscene tasks got their own line in the task output. However, the progress bar code does not handle newlines in its widgets, so the length of the setscene line was included when calculating how much space is available for the progress bar of the running tasks, making it much too short. Instead of trying to teach the progress bar code to handle newlines, separate the output of the setscene tasks from the progress bar for the real tasks. (Bitbake rev: a41f7792f17acdba8c7ea83b79e413ae6a49da68) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty.py: Improve the message while waiting for running tasks to ↵Peter Kjellerstedt2022-03-111-1/+4
| | | | | | | | | | | | finish Use pluralise() to correct the grammar, and drop the colon at the end if runnning in quiet mode. (Bitbake rev: 57396289f935892390c11afe95f3eede28fd80e7) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: uievent: Fix import warning for python 3.10Richard Purdie2022-03-101-1/+1
| | | | | | (Bitbake rev: bf1de5988698c797403ecd30edda99a76e9c02dd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Improve setscene task displayRichard Purdie2022-03-061-3/+3
| | | | | | | | | | | | | | | | | | | There is general agreement the current display of the total setscene and executed full tasks is confusing. Fixing it is tricky to be clear to new users whilst not wasting screen real estate for experienced users and not compromisng features like the progress bar. As a compromise, move the setscene total to the previous line making the status display a two line summary for interactive terminals. This makes it clear what two of the numbers represent (setscene task) whilst separating this out from the other items. Also tweak the non-interactive output to use a comma as a separator, the use of the forward slash was a poor choice. (Bitbake rev: 8055ec360507e6a678ee5c4018ec1ab7f5a9cce5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Correctly handle multiple line itemsRichard Purdie2022-03-061-3/+9
| | | | | | | | | Currently the footer code doesn't quite handle multiline items correct. Fix this to do so. (Bitbake rev: 8eeccf73185d986c6abd6426b1d1e72da3a982df) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart/cookerdata: Add variable remapping supportRichard Purdie2022-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | This change adds support for improving the user experience when variables are renamed. This isn't as simple as it might first appear since some bitbake variables are used through the environment before the datastore exists, some are bitbake variables which we know about straight away and some are metadata defined which we don't know about until later. This patch adds support for handling these different cases, allowing a list of bitbake renamed variables to be defined in bitbake itself and allows this to be extended through the metadata using BB_RENAMED_VARIABLES. In order to give the best feedback to the user, we default to turning on variable history tracking in the base data store from knotty, which allows filename and line number information to be shown. (Bitbake rev: bd50a5d5e4b4fa90844464396887ebdff0d4e5f7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: msg: Add bb.warnonce() and bb.erroronce() log methodsRichard Purdie2022-02-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | This adds a log level and logging function call to use it where the warning or error will only be displayed once, regardless of how many times the message is logged. This has to be done either in the cooker or on the UI side. I've opted for the UI side since display control is really a UI issue but it uses a common library filter function to enable it which can be reused elsewhere. The knotty message displayed as the build summary is tweaked to make sense when the numbers won't match since it will still count the number of times it was logged and this is probably helpful for debugging in some cases so I've deliberately left it that way. (Bitbake rev: 7bd40e3003a043e3cb7efc276681054b563b5e7b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb: Fix string concatination potential performance issuesRichard Purdie2021-11-031-8/+8
| | | | | | | | | | | | | | | | Python scales badly when concatinating strings in loops. Most of these references aren't problematic but at least one (in data.py) is probably a performance issue as the issue is compounded as strings become large. The way to handle this in python is to create lists which don't reconstruct all the objects when appending to them. We may as well fix all the references since it stops them being copy/pasted into something problematic in the future. This patch was based on issues highligthted by a report from AWS Codeguru. (Bitbake rev: d654139a833127b16274dca0ccbbab7e3bb33ed0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb: Clean up use of len()Richard Purdie2021-11-032-12/+12
| | | | | | (Bitbake rev: bbbc843e86639604d00d76b1949b94a78cf1d95d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty/uihelper: Show setscene task progress in summary outputRichard Purdie2021-10-082-4/+6
| | | | | | | | | | | | | | | With the changes to task accounting, bitbake doesn't show progress when executing setscene tasks on the summary console output. Change to show a progress within the setscene tasks and a progress within the main tasks. I can't see any way to display this more easily without confusing users. [YOCTO #14586] (Bitbake rev: 0244acb968eb593d2ad7bc6e52f222c2b1d39aa9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue/knotty: Improve UI handling of setscene task countingRichard Purdie2021-09-172-2/+2
| | | | | | | | | | | | | | | | The recent fixes to merge setscene and normal task accounting in runqueue fixed some display issues but broke the task numbering of setscene tasks. Add new accounting methods to the stats structure specifically designed for setscene. This accounts for the fact that setscene tasks can rerun multiple times in the build. Then use the new data in the UI to correctly display the numbers the user wants to see to understand progress. (Bitbake rev: ed7e2da88bf4b7bfc7ebfc12b9bd6c0fb7d8c1aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Clean up task stats handlingRichard Purdie2021-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | When we parallelised normal and setscene tasks, the task stats handling was left separate pending further thought. We had to remove handling of the setscene tasks from the UI in order to maintain consistent task numbering. Currently, "0 of 0" tasks can be shown as setscene tasks execute until the first normal task runs. The only use left for sq_stats is in the active task numbers which we can use the length of sq_ive for instead. We can therefore drop it and return stats in all cases. This removes the "0 of 0" task problem since the stats in all normal and setscene tasks matches. [YOCTO #14479] (Bitbake rev: eae6e947e37e18cded053814bd2a268b44fb25cd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/taskexp: Fix to work with empty build directoriesRichard Purdie2021-08-061-0/+1
| | | | | | | | | | | | If run on an empty build directory, taskexp wasn't working as it didn't send the current environment to the server. This means HOSTTOOLS in oe-core couldn't be built and gave an error. Add the missing updateToServer call in. [YOCTO #14408] (Bitbake rev: 06a0bbe746f879ae539223e7fdb6f07d55d13719) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/taskexp: Improve startup exception handlingRichard Purdie2021-08-061-0/+4
| | | | | | | | | | When an exception occurs at startup, show it to the user. [YOCTO #14408] (Bitbake rev: cc1df1af67cfd3e223b39e2b7ea5f86b8cf78aee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Re-enable command line logging levelsJoshua Watt2021-05-011-0/+8
| | | | | | | | | | | | The "-l" command line options to enable specific logging domains wasn't working with the switch to structured logging because they were only being used to set the legacy logging domains. Fix this by implementing the logic to parse the user options into the logging configuration. (Bitbake rev: 005fc7a8c588d0b0bca382469645cbf481ad8e30) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: logging: Make bitbake logger compatible with python loggerJoshua Watt2021-02-101-5/+5
| | | | | | | | | | | | | | | | | The bitbake logger overrode the definition of the debug() logging call to include a debug level, but this causes problems with code that may be using standard python logging, since the extra argument is interpreted differently. Instead, change the bitbake loggers debug() call to match the python logger call and add a debug2() and debug3() API to replace calls that were logging to a different debug level. [RP: Small fix to ensure bb.debug calls bbdebug()] (Bitbake rev: f68682a79d83e6399eb403f30a1f113516575f51) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "bb.ui: delete __init__.py to make bb.ui a namespace package"Hongxu Jia2020-11-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit [991f92b4d bb.ui: delete __init__.py to make bb.ui a namespace package] caused `bitbake -h' failed ... $ bitbake -h Traceback (most recent call last): File "/buildarea/raid5/hjia/community/poky/bitbake/bin/bitbake", line 35, in <module> sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv), File "/buildarea/raid5/hjia/community/poky/bitbake/lib/bb/cookerdata.py", line 27, in __init__ self.options, targets = self.parseCommandLine(argv or sys.argv) File "/buildarea/raid5/hjia/community/poky/bitbake/lib/bb/main.py", line 297, in parseCommandLine options, targets = parser.parse_args(argv) File "/usr/lib64/python3.6/optparse.py", line 1387, in parse_args stop = self._process_args(largs, rargs, values) File "/usr/lib64/python3.6/optparse.py", line 1431, in _process_args self._process_short_opts(rargs, values) File "/usr/lib64/python3.6/optparse.py", line 1536, in _process_short_opts option.process(opt, value, values, self) File "/usr/lib64/python3.6/optparse.py", line 785, in process self.action, self.dest, opt, value, values, parser) File "/usr/lib64/python3.6/optparse.py", line 807, in take_action parser.print_help() File "/usr/lib64/python3.6/optparse.py", line 1647, in print_help file.write(self.format_help()) File "/usr/lib64/python3.6/optparse.py", line 1635, in format_help result.append(self.format_option_help(formatter)) File "/usr/lib64/python3.6/optparse.py", line 1615, in format_option_help result.append(OptionContainer.format_option_help(self, formatter)) File "/usr/lib64/python3.6/optparse.py", line 1061, in format_option_help result.append(formatter.format_option(option)) File "/buildarea/raid5/hjia/community/poky/bitbake/lib/bb/main.py", line 54, in format_option valid_uis = list_extension_modules(bb.ui, 'main') File "/buildarea/raid5/hjia/community/poky/bitbake/lib/bb/main.py", line 72, in list_extension_modules pkgdir = os.path.dirname(pkg.__file__) AttributeError: module 'bb.ui' has no attribute '__file__' ... This reverts commit 991f92b4d15b0571b6a540964e5216d1b9728539 (Bitbake rev: 22b8c53205f8915b33d1e0ad6a666dcacc01491d) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.ui: delete __init__.py to make bb.ui a namespace packageChris Laplante2020-11-111-7/+0
| | | | | | | | | | | | | This would permit creation of third-party UI modules without having to incorporate them directly into BitBake, with BitBake able to automatically discover them in the same way it finds its built-in UIs. See https://packaging.python.org/guides/packaging-namespace-packages/ (Bitbake rev: 991f92b4d15b0571b6a540964e5216d1b9728539) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/toasterui: Fix startup faults from incorrect event sequencingRichard Purdie2020-10-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | Toaster has been failing to start correctly when in interactive mode. The issue is due to setEventMask being called (which triggers parsing) before the environment has been sent from the UI over to the server. This means PATH isn't setup, which causes the sanity checks on HOSTTOOLS to fail in base.bbclass. The fix is to ensure the environment is sent to the server before other commands are run. The pain in debugging this highlights other improvements to the logging are needed. [YOCTO #14079] Reviewed-by: Tim Orling <timothy.t.orling@linux.intel.com> Tested-by: Tim Orling <timothy.t.orling@linux.intel.com> (Bitbake rev: a8efff5c83cd5a25f4b6720e6414a7aa35d04bc7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/ui/knotty: fix typo in parseprogressTim Orling2020-10-171-1/+1
| | | | | | | | | | | After parseprogress.finish() it was intended to set parseprogress to None, but a typo means this is not happening. (Bitbake rev: f504d6f6598f62aa20fbf69c30fea95569858edb) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: taskexp: update for GTK API changesRoss Burton2020-09-241-1/+6
| | | | | | | | | | | | | | | | | | | The introspected API for GtkTreeModel and friends had some unexpected quirks which have now been fixed, see[1] for details. However, for example Ubuntu 20.04 has the fixed GTK but not an updated pygobject which means taskexp raises an exception on startup. Solve by manually looking at what functions are present and calling the right one. [ YOCTO #14055 ] [1] https://gitlab.gnome.org/GNOME/pygobject/-/commit/9cdbc56fbac4db2de78dc080934b8f0a7efc892a (Bitbake rev: ac7d1114a7e99e6efd6a37b03d170faf678513fb) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process/knotty: Improve early exception handlingRichard Purdie2020-09-021-4/+17
| | | | | | | | | | | | | | | | | | | | The new server startup code means exceptions can happen when we aren't setup to show them to the user correctly, leading to ugly tracebacks. Add in some special case handling of BBHandledException to at least ensure that common case doesn't traceback and the user sees meaningful output. In the future, the logging setup can likely be improved, as can the way runCommand handles exceptions, they all should likely become real exceptions again on the UI side. [YOCTO #14022] [YOCTO #14033] (Bitbake rev: 6059d0e77f60ddb679049bd34478f41b1ab7995d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib: fix most undefined code picked up by pylintFrazer Clews2020-08-253-2/+8
| | | | | | | | | | Correctly import, and inherit functions, and variables. Also fix some typos and remove some Python 2 code that isn't recognised. (Bitbake rev: b0c807be5c2170c9481c1a04d4c11972135d7dc5) Signed-off-by: Frazer Clews <frazerleslieclews@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/teamcity: don't use removed logging classesChris Laplante2020-07-081-2/+0
| | | | | | | | | Allows the TeamCity frontend to be used again. (Bitbake rev: c5477ba79fcad4a887808dd0df9cfe3554e2c17a) Signed-off-by: Chris Laplante <mostthingsweb@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/ui/taskexp: Fix missing Gtk importDavid Khouya2020-07-071-0/+1
| | | | | | | | | | | Adding back gtk objects import. Fix bug introduce when adding validation on gtk import. (Bitbake rev: 765be5ef60668f8a1cfbcba248f4995725807196) Signed-off-by: David Khouya <dakhouya@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/ui/taskexp: Validate gi importDavid Khouya2020-07-061-3/+9
| | | | | | | | | | | | | When running bitbake -g -u taskexp without having gi python module or and invalid gtk version, bitbake fails with a stack trace. In case of import or version error, bitbake should exit with an error message instead of a stack trace. (Bitbake rev: 2a2c507f239b047f34765312df4168030e38b90d) Signed-off-by: David Khouya <dakhouya@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty/msg: Use logging.shutdown() instead of bb.msg.cleanupLogging()Joshua Watt2020-03-131-1/+1
| | | | | | | | | | The logging module provides a shutdown() function that does the same thing in a much better way (Bitbake rev: 970cd2fc4f0bbc93069dee5a15a608dd76081c67) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Treat verbconsole as a console outputJoshua Watt2020-03-131-22/+18
| | | | | | | | | | | | | | | | | | | | The BitBake.verbconsole needs to be treated like a console output logger (meaning that the TerminalFilter attaches an InteractConsoleLogFilter to it), even if it's not directly attached to the root 'BitBake' logger. First, assign a special "is_console" property to the relevant handlers, then look for the property in the handlers from the configuration object return by bb.msg.setLoggingConfig(). Finally, pass the list of all handlers to the TerminalFilter object; it doesn't care about the difference between console and errconsole, so pass all the relevant handlers as a list. This fixes cases where the console output was corrupted when messages were sent to the 'BitBake.verbconsole' handler. (Bitbake rev: 2010be588c74a99256df7b565a309c84c2973546) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>