aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
AgeCommit message (Collapse)Author
2012-09-24bitbake: event.py, knotty.py, ncurses.py, runningbuild.py: Add support for ↵Jason Wessel
LogExecTTY event The LogExecTTY even is intended to provide the ability to spawn a task on a the controlling tty, if a tty is availble. When a controlling tty is not availble the previous behavior is preserved where a warning is issued about the action an end user must execute. All the available UI's were tested against the new event type. This feature is primarily intended for hooking up a screen client session automatically on the controlling tty to allow for a more streamlined end user experience when using a pure command line driven environment. The changes that send the LogExecTTY event are in the oe-core side. (Bitbake rev: cffe80d82a46aaf52ff4a7b6409435754043553f) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22bitbake: ui: Improve error message if bitbake cannot import python curses moduleKonrad Scherer
On some SuSE systems, the curses python module is not installed by default. Instead of a python failure, we want a nicer error message. (On SuSE systems the package is typically python-curses.) (Bitbake rev: 65a5845ac942d0aa6838c295e41b656f9d2a98bb) Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Reword commit message, rebase to latest bitbake. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-18bitbake: build.py: Correct package to recipe in TaskBase events to use ↵Richard Purdie
consistent terminology (Bitbake rev: e5045429bce15b66c4355be214db3982ac7761f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16bitbake: knotty: Fold knotty2 into knotty and make it the defaultRichard Purdie
There is no good reason knotty2 shouldn't be the default now. If you need the old behaviour, just pipe the output through cat as non-interactive terminals get the old output. (Bitbake rev: b97d50618b2187bcfd7d25f64d1444482ca62ef7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16bitbake: knotty: Chain the WINCH signal handler in progressbar so any other ↵Richard Purdie
handler is preserved and called (Bitbake rev: 7753e075dbeee471b9ceb34f1e3165aa656932ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02bitbake: knotty: ensure that directory for BB_CONSOLELOG exists before using itMartin Jansa
(Bitbake rev: 1e06d8012868ba5a31503dc99cbf18570be629d9) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-29knotty: Add back getTasks() call to ensure we don't repeat messgesRichard Purdie
(Bitbake rev: 8fed4fdf4bbbc9ef036ff96755c0bfe15c3a9dd0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-29ui/knotty: Add a footer to the build output for interactive terminals as ↵Richard Purdie
knotty2 UI On terminals which support it, add summary information to the end of the build output about the number of tasks currently running and how many tasks we've run so far. This provides a summary at a glace of what the current state of the build is and what the build is currently doing which is lacking in the current UI. Also disable echo of characters on stdin since this corrupts the disable, particularly Crtl+C. The "waiting for X tasks" code can be merged into this code too since that is only useful on interactive terminals and this improves the readability of that output too. Improvements since v0: * The tasks are ordered in execution order. * The display is only updated when the list of tasks changes or there is output above the footer. * Running task x oy y and package messages are supressed from the console This UI can be accessed with "bitbake -u knotty2". (From Poky rev: e38b4569648f2916c4370871c79e6a6090eb8bc1) (Bitbake rev: 156189c799d2bb1f69bdaa04b5cd718fe7881425) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-28bitbake: fix setscene task start/failure handlingPaul Eggleton
* When a setscene task starts, print out that it's starting in the UI (ensuring we get the correct task name) * When a setscene task fails, ensure we remove it from the list of running tasks so that if you break out any time afterwards it is not still listed. (Bitbake rev: e8a3499c95a6d4f2b8fed002fb9504733c5be3c6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23bitbake: change for adding progress bar in Hob2.Shane Wang
The changes include: - Clean some events in event.py - Fire essential events for Hob2 to handle with more information. - knotty changes (Bitbake rev: 9ede881620c501574f014e600cea6947ea908ac2) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-22bitbake/ui/knotty: fix incorrect exit codePaul Eggleton
The recent Ctrl+C patch was not fully tested; the variable it was relying upon is set to non-zero under other circumstances and thus bitbake was reporting that it was interrupted and returning a non-zero exit code when it was not. Track this status in a separate variable in order to fix the issue. (Bitbake rev: 95a599067650902727ecb4a39d6dd003c5cfedf3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-22bitbake/knotty: ensure CommandFailed increases error countPaul Eggleton
CommandFailed already sets the return code, so we print out the error summary message, however we don't increase the error count so it is usually zero in this case. As we are actually showing an ERROR message, increment the error count so that the summary makes sense. (Bitbake rev: aeb71c3ca65dc42015c29c0e4cac050bfbcb51a5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-22bitbake/knotty: ensure we return non-zero exit code on Ctrl+CPaul Eggleton
If the user uses Ctrl+C to exit out of the build, then ensure we return a non-zero exit code since the entire build was not completed successfully. If nothing else, this is useful to avoid continuing in the bitbake wrapper script in OE-Core if the initial pseudo build is interrupted. (Bitbake rev: c11eab7fa230f1fd5cc33589f3555b94e95f202d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-22knotty: shut down more cleanlyChristopher Larson
This ensures that when we are shutting down, we drain the queue of events from the server. This ensures that the server never gets hung up on the join of the feeder thread associated with the event queue, thereby avoiding a bitbake hang issue. Also, since the third keyboard interrupt now behaves the same as the second, removed that message. (Bitbake rev: ce9e0946b8a412616074809c76fba54f8bff36c4) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/knotty: print task failure summaryPaul Eggleton
Remove the error logged within cooker summarising the list of failed tasks, and instead print this in the UI (knotty) where it belongs. This also adds the actual name of the task that failed as well as the corresponding recipe file that was being shown previously. In addition, reformat the summary messages more tidily - no extra breaks between lines and use correct English singular/plurals, with some allowance for future translation. (Bitbake rev: cdf69913f99d28bc7f51067a60257701f952c6cb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/knotty: avoid printing full task log when error already printedPaul Eggleton
If a task has logged an ERROR then don't print the contents of the task's log file in knotty (the default terminal UI). As a side-effect we now also respect BBINCLUDELOGS in knotty; if it is false we never print the log (but the pointer to the log file is always printed). (Bitbake rev: b9746b7e4d7aa5c34eba15a61427bfc6949af123) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/knotty: don't count errors as warnings in summaryPaul Eggleton
The count of warnings being shown in the summary at the end was also including the number of errors. (Bitbake rev: d242d6ca81dd83b2b13a3ac77ac4cd829a69cf83) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-10bitbake/knotty: Show summary of warning/error messages shownRichard Purdie
Show a summary count of warning/errors messages shown to the user during the build and make it clear when an error exit code is being set. [YOCTO #1540] (Bitbake rev: 9943bad611a974e4d37a00c7a4de1752250370c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-24knotty: Add support for logging the console to logfileRichard Purdie
The BB_CONSOLELOG variable is used to specify the console log file to use. This means people can look up things that happened during a build by may have scrolled off the screen. [YOCTO #1771] (Bitbake rev: a34ff490a46577a64345365fa1ac39c48d0861cd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-15bitbake/logging: Overhaul internal logging processRichard Purdie
At the moment it bugs me a lot that we only have one effective logging level for bitbake, despite the logging module having provision to do more advanced things. This patch: * Changes the core log level to the lowest level we have messages of (DEBUG-2) so messages always flow through the core logger * Allows build.py's task logging code to log all the output regardless of what output is on the console and sets this so log files now always contain debug level messages even if these don't appear on the console * Moves the verbose/debug/debug-domains code to be a UI side setting * Adds a filter to the UI to only print the user requested output. The result is more complete logfiles on disk but the usual output to the console. There are some behaviour changes intentionally made by this patch: a) the -v option now controls whether output is tee'd to the console. Ultimately, we likely want to output a message to the user about where the log file is and avoid placing output directly onto the console for every executing task. b) The functions get_debug_levels, the debug_levels variable, the set_debug_levels, the set_verbosity and set_debug_domains functions are removed from bb.msg. c) The "logging" init function changes format. d) All messages get fired to all handlers all the time leading to an increase in inter-process traffic. This could likely be hacked around short term with a function for a UI to only request events greater than level X. Longer term, having masks for event handlers would be better. e) logger.getEffectiveLevel() is no longer a reliable guide to what will/won't get logged so for now we look at the default log levels instead. [YOCTO #304] (Bitbake rev: 45aad2f9647df14bcfa5e755b57e1ddab377939a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-10bitbake/ui/knotty: Ensure previous failures aren't masked by a final ↵Richard Purdie
successful command When running bitbake in -k mode, the last command might succeed but we still need to preserve any previous failure codes. (Bitbake rev: 3ad3a53545b37ee8b26b22f4a0e00b19615b449a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-10bitbake/ui/knotty: Ensure 'No Provider' errors set an exit codeRichard Purdie
If a No Provider error is shown we need to set the exit code to show an error occured too. [YOCTO #1322] (Bitbake rev: 4d4e01aa3e38d809617e8c1bbaa081182a2308a0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27bitbake: show more information for NoProvider errorsPaul Eggleton
"Nothing PROVIDES" errors often come up when a recipe has been skipped for some reason, and therefore it is useful to print out that reason information when showing the error so that the user understands why the error has occurred. Given that we already feed the reason information into the skiplist for various situations (COMMERCIAL_LICENSE, COMPATIBLE_MACHINE etc.) this should now output a useful error message for skipped recipes. Fixes [YOCTO #846], [YOCTO #1127] (Bitbake rev: 6765218430e31c165888f26fbc75023c89a6eab2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08bitbake cooker/ui: handle cmd line parsing result by individual UI.Lianhao Lu
Changed the return result of "getCmdLineAction" to a dictionary {'action', 'msg'} to allow the individual UI decide how to handle the cmd line parsing result. (Bitbake rev: 521909d1350a415d19516aa1710041e30950c7cc) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09bitbake/event/ast: Add RecipePreFinalise eventRichard Purdie
One of the implications is we need to register the event handlers before executing the anonymous python functions. I can't find any issue with making that change in any existing metadata use cases. (Bitbake rev: a981df3cc9bf410d24f39919959952bdc6c76d03) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid ↵Richard Purdie
reparsing Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-12bitbake/knotty.py: Ensure task note messages are only surpressed at default ↵Richard Purdie
log levels Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-08bitbake/knotty.py: Don't show log messages of NOTE and below for task processesRichard Purdie
This cleans up the knotty console messages to be a lot quieter and cleaning, in keeping with the expectations of most users. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-05bitbake: Misc syncups with bitbake upstream, mostly whitespace and a missed ↵Richard Purdie
line from the last UI commit Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-05Resurrect alternative UIsBob Foerster
The various alternative UIs have been updated to once again be functional with the latest bitbake internals. Each of the UIs still have much room for functional improvement. In particular, they have been updated to: - interact with the new process based server - handle the current set of events and notifications fired from the server and its associated subsystems (Bitbake rev: b947e7aa405966262c0614cae02e7978ec637095) Signed-off-by: Bob Foerster <robert@erafx.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04logger usage cleanupChris Larson
(Bitbake rev: 976e4f84a8147ad762442df7ff4820611a21d227) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04Fix logging level names for post-server-ui-splitChris Larson
(Bitbake rev: dc5a5c39291ec223cd761dce59d29eee7316cb70) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04Show the user progress when loading the cacheBob Foerster
(Bitbake rev: bdd7813d8eecf7b6b636322e748ca6bf69118513) Signed-off-by: Bob Foerster <robert@erafx.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04knotty: exit with 1 if we see a critical log messageChris Larson
(Bitbake rev: d527ca441539618c990291fb8340f552ac760bce) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04bitbake: Transfer noexec runqueue messages to the UIRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04Move the runq task start/failed messages to the UIChris Larson
(Bitbake rev: ab831e867f09b47001cb8da2f8f060e04febf237) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04Rename command events, adjust compareRevisionsChris Larson
- Moved the logic for comparing revisions from cooker into command - Removed 'Cooker' from the event names - Renamed the 'ExitCode' event into CommandExit, and changed CommandFailed to be a subclass of CommandExit (Bitbake rev: c51ed5d7a9971fad6019dac6c35a71b8a54ab16a) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04build: send logging messages to the log file for python functionsChris Larson
(Bitbake rev: ee1cce6ab21ddda60a7a070d03e98ff8485a5e71) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04Rename the ui 'init' method to 'main'Chris Larson
As these may run the UI in a blocking fashion and then return the exit code, 'init' was an inappropriate name, and 'main' is more appropriate. (Bitbake rev: 4d081a0ed759bd526ab01849d650bd9e8d80ddd1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04knotty: use enumerate for task waitingChris Larson
(Bitbake rev: 89ce8df075ac8c9a5478c86405e6e6b60346a51c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04knotty: shift non-interactive progress into a classChris Larson
(Bitbake rev: c3d005cbbae3d56da9926666cfb1501c2bf96ea7) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04cooker: no cached in progressbar and add ETAChris Larson
Rather than updating the progress bar based on the recipe being processed (whether cached or parsed), consider only parsed recipes. This reduces the instability in progress rate introduced by the cached entries, and allows the ETA to be resurrected and be a bit more useful. (Bitbake rev: 618480f7739f6ae846f67a57bee5a78efb37839d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04knotty: drop the ETA from the progressbar for nowChris Larson
Currently, the progress bar is an indication of the processing of our recipes, which includes loading the cache file, then for each recipe, either adding the existing cached information to the CacheData or parsing the recipe from disk. These tasks clearly take different amounts of time, so the ETA is unreliable today. We'll resurrect this functionality after we revamp the progress handling, fully incorporating the load of the cache file. (Bitbake rev: 80867372dcbef91ebaf7d77a77ca871741dd3f74) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04cache: sync the cache file to disk in the backgroundChris Larson
This version uses a thread rather than a process, to avoid problems with waitpid handling. This gives slightly less overall build time reduction than the separate process for it did (this reduces a -c compile coreutils-native by about 3 seconds, while the process reduced it by 7 seconds), however this time is quite insignificant relative to a typical build. The biggest issue with non-backgrounded syncing is the perceived delay before work begins, and this resolves that without breaking anything, or so it seems. (Bitbake rev: 5ab6c5c7b007b8c77c751582141afc07c183d672) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04Experimental usage of the 'progressbar' moduleChris Larson
(Bitbake rev: 64feb03bc2accecb49033df65e0a939ef5ab5986) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04Use logging in the knotty ui, and pass the log record across directlyChris Larson
This kills firing of Msg* events in favor of just passing along LogRecord objects. These objects hold more than just level and message, but can also have exception information, so the UI can decide what to do with that. As an aside, when using the 'none' server, this results in the log messages in the server being displayed directly via the logging module and the UI's handler, rather than going through the server's event queue. As a result of doing it this way, we have to override the event handlers of the base logger when spawning a worker process, to ensure they log via events rather than directly. (Bitbake rev: c23c015cf8af1868faf293b19b80a5faf7e736a5) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04Use the python logging module under the hood for bb.msgChris Larson
(Bitbake rev: 47ca82397bc395b598c6b68b24cdee9e0d8a76d8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-20bitbake/knotty: Exiting as soon as a fatal is seen is not desirable as the ↵Richard Purdie
stacktrace won't be seen Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02Apply some 2to3 refactoringsChris Larson
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02knotty: use the future division to prep for 3.xChris Larson
(Bitbake rev: bd0edc19f691146e748b91255be7a5788a070de6) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>