summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
Commit message (Collapse)AuthorAgeFilesLines
* knotty: Add back getTasks() call to ensure we don't repeat messgesRichard Purdie2012-03-291-0/+2
| | | | | | (Bitbake rev: 8fed4fdf4bbbc9ef036ff96755c0bfe15c3a9dd0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ui/knotty: Add a footer to the build output for interactive terminals as ↵Richard Purdie2012-03-291-18/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bitbake: fix setscene task start/failure handlingPaul Eggleton2012-02-281-0/+9
| | | | | | | | | | | | | * 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>
* bitbake: change for adding progress bar in Hob2.Shane Wang2012-02-231-1/+4
| | | | | | | | | | | | | 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>
* bitbake/ui/knotty: fix incorrect exit codePaul Eggleton2012-02-221-1/+3
| | | | | | | | | | | | | 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>
* bitbake/knotty: ensure CommandFailed increases error countPaul Eggleton2012-02-221-0/+1
| | | | | | | | | | | | 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>
* bitbake/knotty: ensure we return non-zero exit code on Ctrl+CPaul Eggleton2012-02-221-0/+5
| | | | | | | | | | | | | | 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>
* knotty: shut down more cleanlyChristopher Larson2012-02-221-8/+7
| | | | | | | | | | | | | | | 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>
* bitbake/knotty: print task failure summaryPaul Eggleton2012-01-151-2/+22
| | | | | | | | | | | | | | | | 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>
* bitbake/knotty: avoid printing full task log when error already printedPaul Eggleton2012-01-151-1/+1
| | | | | | | | | | | | | | 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>
* bitbake/knotty: don't count errors as warnings in summaryPaul Eggleton2012-01-151-1/+1
| | | | | | | | | | 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>
* bitbake/knotty: Show summary of warning/error messages shownRichard Purdie2012-01-101-2/+11
| | | | | | | | | | | 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>
* knotty: Add support for logging the console to logfileRichard Purdie2011-11-241-0/+6
| | | | | | | | | | | | 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>
* bitbake/logging: Overhaul internal logging processRichard Purdie2011-08-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bitbake/ui/knotty: Ensure previous failures aren't masked by a final ↵Richard Purdie2011-08-101-1/+2
| | | | | | | | | | | 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>
* bitbake/ui/knotty: Ensure 'No Provider' errors set an exit codeRichard Purdie2011-08-101-0/+1
| | | | | | | | | | | 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>
* bitbake: show more information for NoProvider errorsPaul Eggleton2011-07-271-0/+3
| | | | | | | | | | | | | | | | | | "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>
* bitbake cooker/ui: handle cmd line parsing result by individual UI.Lianhao Lu2011-07-081-1/+5
| | | | | | | | | | | 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>
* bitbake/event/ast: Add RecipePreFinalise eventRichard Purdie2011-06-091-0/+1
| | | | | | | | | | 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>
* bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid ↵Richard Purdie2011-05-051-0/+5
| | | | | | reparsing Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/knotty.py: Ensure task note messages are only surpressed at default ↵Richard Purdie2011-01-121-2/+6
| | | | | | log levels Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/knotty.py: Don't show log messages of NOTE and below for task processesRichard Purdie2011-01-081-3/+3
| | | | | | | 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>
* bitbake: Misc syncups with bitbake upstream, mostly whitespace and a missed ↵Richard Purdie2011-01-051-3/+0
| | | | | | line from the last UI commit Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Resurrect alternative UIsBob Foerster2011-01-051-0/+4
| | | | | | | | | | | | | | | | 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>
* logger usage cleanupChris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: 976e4f84a8147ad762442df7ff4820611a21d227) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix logging level names for post-server-ui-splitChris Larson2011-01-041-10/+0
| | | | | | | (Bitbake rev: dc5a5c39291ec223cd761dce59d29eee7316cb70) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Show the user progress when loading the cacheBob Foerster2011-01-041-8/+24
| | | | | | | | (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>
* knotty: exit with 1 if we see a critical log messageChris Larson2011-01-041-2/+3
| | | | | | | (Bitbake rev: d527ca441539618c990291fb8340f552ac760bce) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Transfer noexec runqueue messages to the UIRichard Purdie2011-01-041-2/+9
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move the runq task start/failed messages to the UIChris Larson2011-01-041-0/+11
| | | | | | | (Bitbake rev: ab831e867f09b47001cb8da2f8f060e04febf237) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Rename command events, adjust compareRevisionsChris Larson2011-01-041-5/+5
| | | | | | | | | | | | - 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>
* build: send logging messages to the log file for python functionsChris Larson2011-01-041-10/+2
| | | | | | | (Bitbake rev: ee1cce6ab21ddda60a7a070d03e98ff8485a5e71) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Rename the ui 'init' method to 'main'Chris Larson2011-01-041-1/+1
| | | | | | | | | | 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>
* knotty: use enumerate for task waitingChris Larson2011-01-041-3/+1
| | | | | | | (Bitbake rev: 89ce8df075ac8c9a5478c86405e6e6b60346a51c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* knotty: shift non-interactive progress into a classChris Larson2011-01-041-15/+33
| | | | | | | (Bitbake rev: c3d005cbbae3d56da9926666cfb1501c2bf96ea7) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: no cached in progressbar and add ETAChris Larson2011-01-041-2/+2
| | | | | | | | | | | | 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>
* knotty: drop the ETA from the progressbar for nowChris Larson2011-01-041-1/+1
| | | | | | | | | | | | | | 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>
* cache: sync the cache file to disk in the backgroundChris Larson2011-01-041-15/+19
| | | | | | | | | | | | | | | | 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>
* Experimental usage of the 'progressbar' moduleChris Larson2011-01-041-8/+12
| | | | | | | (Bitbake rev: 64feb03bc2accecb49033df65e0a939ef5ab5986) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Use logging in the knotty ui, and pass the log record across directlyChris Larson2011-01-041-31/+41
| | | | | | | | | | | | | | | | | | 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>
* Use the python logging module under the hood for bb.msgChris Larson2011-01-041-6/+6
| | | | | | | (Bitbake rev: 47ca82397bc395b598c6b68b24cdee9e0d8a76d8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/knotty: Exiting as soon as a fatal is seen is not desirable as the ↵Richard Purdie2010-08-201-1/+1
| | | | | | stacktrace won't be seen Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply some 2to3 refactoringsChris Larson2010-07-021-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* knotty: use the future division to prep for 3.xChris Larson2010-07-021-2/+3
| | | | | | | (Bitbake rev: bd0edc19f691146e748b91255be7a5788a070de6) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* knotty: stop freaking out and dying when bb.build has removed the empty logfileChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 2197182fe5837d74f1499c644e882e87cf035238) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move the output of no provider and multiple provider messages into the UIChris Larson2010-07-021-2/+18
| | | | | | | (Bitbake rev: 36b980c16bf74b3c2066cc120f9f27e11f189a63) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Make knotty ignore the NoProvider eventChris Larson2010-07-021-15/+8
| | | | | | | (Bitbake rev: e07f759dae96c0819c35bb67e1da18ca361bb584) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply some 2to3 transforms that don't cause issues in 2.6Chris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply the 2to3 print function transformChris Larson2010-07-021-22/+22
| | | | | | | (Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Formatting cleanupsChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>