summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake/logging: Overhaul internal logging processRichard Purdie2011-08-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update version to 1.13.3Richard Purdie2011-07-251-1/+1
| | | | | | (Bitbake rev: f0b5d16426b983a67c51c47f3542162108bd4156) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake|cooker: save a copy of the environment when BitBake is startedJoshua Lock2011-07-251-1/+4
| | | | | | | | | | | | Create a data store in the cooker containing the values of the environment from when BitBake is launched such that child processes can replicate (and/or use values from) the host environment, rather than the cleaned up environment that the main BitBake process uses. (Bitbake rev: 54c7206165c0e7cfe5f7b243c80461baf5e7dfb1) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* adjust comments/messages for default server changePaul Eggleton2011-07-251-3/+3
| | | | | | | | | Default server is process, adjust comments and messages accordingly. (Bitbake rev: 8ba4d0e98401cdb808f727703913ad8ba87f8e71) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* add note to -b option indicating no dependency handlingPaul Eggleton2011-07-251-1/+1
| | | | | | | | | The -b option doesn't handle dependencies so note this in the help. (Bitbake rev: b133b2e2dd5bcde705397eb38fa20a5c4da6e3b3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Switch to use process as the default serverRichard Purdie2011-07-051-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Add missing bracket, somehow lost by sync scripts1.1_M2.rc1Richard Purdie2011-07-011-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: add -R option for loading configuration files after bitbake.confJoshua Lock2011-07-011-1/+4
| | | | | | | | | | Useful if you want to load a configuration file that sets values which may also be set in bitbake.conf or one of the files it includes. (Bitbake rev: a8246ae5400c23df0d3ee29c36f4d9f257d1e6d1) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Make bitbake server type configurable.Liping Ke2011-07-011-7/+18
| | | | | | | | | | Add -t options in bitbake for configuring server type. (Bitbake rev: 5591329948648927154024bcb882c45766defac2) Signed-off-by: Liping Ke <liping.ke@intel.com> Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Update version to 1.13.2Richard Purdie2011-06-281-1/+1
| | | | | | (Bitbake rev: 5d41720d1550c04aac76275614ca15110c1c7f52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* make exception handling syntax consistentScott Garman2011-06-151-1/+1
| | | | | | | | | | Update exception handling syntax to use the modern style: except ExcType as localvar (Bitbake rev: dbf5f42b06bef81749b13aa99945cc1292a6676d) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Update version to 1.13.1Richard Purdie2011-06-091-1/+1
| | | | | | (Bitbake rev: c3c2ad6f22e35b893a353d4c21d0e923e46ad07b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Drop psyco supportRichard Purdie2011-06-091-3/+0
| | | | | | | | | | | At best it gave 1-2% improvement now, its 32 bit x86 only and isn't supported after python 2.6. PyPy is probably a better option now. (Bitbake rev: 3c3bd0c2fa80d747f25401c17b785c7c2f3787ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cooker.py: Misc sync with upstreamRichard Purdie2011-06-081-1/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/bin/bitbake: Return an error if exceptions occurRichard Purdie2011-06-081-0/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/server/process: Update to new server APIRichard Purdie2011-06-081-2/+4
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Cleanup bitbake server init process to be clearer to followRichard Purdie2011-06-081-9/+14
| | | | | | | | Create a standard format server class instance with method calls for each step in the server setup. There should be enough hooks for each of the different server types. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Sync up with upstream cosmetic changes for bin/bitbakeRichard Purdie2011-06-081-11/+8
| | | | | | | | Sync cosmetic differences between bitbake in poky and bitbake upstream in preparation for resolving the real code differences in the server handling. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Resurrect alternative UIsBob Foerster2011-01-051-1/+1
| | | | | | | | | | | | | | | | 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>
* Ensure that the invalid UI error goes to stderrChris Larson2011-01-041-11/+20
| | | | | | | (Bitbake rev: 76aeea2c23a518046d0b26f1a6fc43287a180a9d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Silence python 2.7 nested context manager warningChris Larson2011-01-041-0/+1
| | | | | | | (Bitbake rev: 1c38f19fb8da2e6c55394162d0142e7146387e54) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Kill the uncaught exception handlerChris Larson2011-01-041-12/+6
| | | | | | | | | | | | We now wrap the main() in a try/except, ensuring that both the main portion of bin/bitbake and the UI raising an exception will be shown to the user. For the server and workers, we can ensure in the server itself that exceptions are handled correctly. (Bitbake rev: 240d4a7ae80a6636c302ae84266ddfed7a7fcedd) 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-16/+5
| | | | | | | | | | 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>
* Error more pleasantly when trying to use python2.4Chris Larson2011-01-041-10/+11
| | | | | | | (Bitbake rev: 57402ee727c8c1d8f5017534fb0f5e0b20aaaa5b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Don't show a traceback for a python version errorChris Larson2011-01-041-1/+4
| | | | | | | (Bitbake rev: 44c325306e55336b7b416fd88b39874012a3f603) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Use __file__, not sys.argv[0]Chris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: 97e92abe49663eee189c89c1dc91fe69891faf73) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Don't show uncaught exception message for KeyboardInterruptChris Larson2011-01-041-1/+5
| | | | | | | (Bitbake rev: 29634acd262b06fd14f6ef1e134346f274cf448f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Switch bitbake internals to use logging directly rather than bb.msgChris Larson2011-01-041-6/+6
| | | | | | | | | | | | | | We use a custom Logger subclass for our loggers This logger provides: - 'debug' method which accepts a debug level - 'plain' method which bypasses log formatting - 'verbose' method which is more detail than info, but less than debug (Bitbake rev: 3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d) 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-1/+4
| | | | | | | | | | | | | | | | | | 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-2/+5
| | | | | | | (Bitbake rev: 47ca82397bc395b598c6b68b24cdee9e0d8a76d8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Ignore python warnings that come from places we don't care aboutChris Larson2011-01-041-1/+5
| | | | | | | | | Only shows warnings that come from bb, oe, or <string> (Bitbake rev: 57018687f60b222ab220dd904c4bf870780171e9) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop the 'ui failed to start' message, as the ui_init does more in knottyChris Larson2011-01-041-5/+1
| | | | | | | (Bitbake rev: 39087138ffd5d427f07ecaa580a40885c5ffaff3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Rewrite profiling code so its functional for both none and xmlrpc ↵Richard Purdie2010-11-131-2/+2
| | | | | | backends Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: save the initial PATH for use when starting a subprocessJoshua Lock2010-09-081-0/+1
| | | | | | | | | | | It was possible for bitbake-runtime to be run against a semi-installed python-native resulting in tracebacks with ImportError's. To prevent this we stash the initial PATH in the BBConfiguration when bitbake is started and then set this in the env when launching bitbake-runtask through subprocesses Popen() call. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: Implement signaturesRichard Purdie2010-09-031-0/+3
| | | | | | Includes functionality to find out what changes between two different singature data dumps. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* *: use print() as a functionBernhard Reutner-Fischer2010-07-161-3/+3
| | | | | | | | | to make python3 happy (Bitbake rev: c82926ccdd4ec4e3ad6e78a381dacb96adf9b409) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> 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>
* Until the interactive mode is fixed, kill it from the valid options, to ↵Chris Larson2010-07-021-3/+0
| | | | | | | | | avoid confusion (Bitbake rev: 65a51bb20677148a29b9e472f6d9d0a97798f024) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move serverConnection.terminate() back into the finallyChris Larson2010-07-021-1/+2
| | | | | | | (Bitbake rev: 58e1b0a5dbd0f1ca137ad7ed1bd7ad9975a20fb7) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Limit the traceback length in the default exception handlerChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 2b9dc5b55e24b4946ff03bf30ca52a48547caaad) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Resurrect the excepthook, this time just sending the info with bb.fatalChris Larson2010-07-021-0/+8
| | | | | | | (Bitbake rev: 07757a1bf1129cc6a967a7cf1815d3d46a6bbdcf) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* remove return in finally statementCliff Brake2010-07-021-3/+3
| | | | | | | | | | causes exceptions to not be handled after the finally statement (Bitbake rev: 1a04610dea376340b9ea4c109f64995b4fd6ad02) Signed-off-by: Cliff Brake <cbrake@bec-systems.com> Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop the non-debug traceback suppressor, at this point I think it does more ↵Chris Larson2010-07-021-13/+0
| | | | | | | | | harm than good (Bitbake rev: 2c66ddc2713061ba31363ea69c24944f4a7cd3a8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Reorganize the main exception handling so an attribute exception raised in ↵Chris Larson2010-07-021-5/+8
| | | | | | | | | the ui isn't misinterpreted (Bitbake rev: 49b8bab706c59e93287f8540187b62ba3ece0a11) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Adjust the exception handling based on Cliff Brake's patchChris Larson2010-07-021-1/+2
| | | | | | | | | | Rather than printing the exception ourselves, might as well re-raise and let the default exception handler do it for us. (Bitbake rev: acca7eb8450cbe30d65b5b266f1a642e7965df8a) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix the debug level check in print_exceptionChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 9cb52edf9198fe6db735abbb61d0c4026c97a8d9) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move the python version check into the python packageChris Larson2010-07-021-5/+1
| | | | | | | | | | | | | | | This ensures the check is run for anyone using the package, including setup.py, though it's sad that it's necessary, since all it really wants is __version__. Ideally, we'd avoid the version check entirely in favor of checking for functionality, but that's rather difficult with language constructs like context managers, so this'll do for now. (Bitbake rev: f936f1c0edf70860ea0f39ec1a500ba43b56f289) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop an unnecessary second python version check and use the less ugly ↵Chris Larson2010-07-021-6/+2
| | | | | | | | | sys.version_info (Bitbake rev: 8f4b7b10f8740a41c085beeca5105f15204b0979) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Bump version to 1.11.0Chris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 6c89c332664a7789d02a701e7e530838ab778264) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move the python version check before the module imports, in case the modules ↵Chris Larson2010-07-021-4/+7
| | | | | | | | | utilize the newer python features (Bitbake rev: 87c15dfcbeb10e7cafb14726209e4954671b3dbe) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>