summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/event.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: show more information for NoProvider errorsPaul Eggleton2011-07-271-1/+2
| | | | | | | | | | | | | | | | | | "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>
* event: fix the event display order when exiting earlyChris Larson2011-07-211-2/+1
| | | | | | | | | | | | It was displaying the log messages in LIFO order, which isn't what we expect to see. Thankfully this only occurred during an early abort (e.g. config file parsing error), but those are the cases where it's very important to see accurate messages, to diagnose. (Bitbake rev: b838e0f3a1b481c295f66f5c9f561fa4d51de673) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cooker|command|event: add new command findFilesMatchingInDirJoshua Lock2011-07-011-0/+10
| | | | | | | | | | | | | | This command can be used to search each BBPATH for files in the passed directory which have a filename matching the supplied pattern. This is implemented for use from the GUI (to determine the available PACKAGE_CLASSES) but has been written so as to be generically useful and reusable. (Bitbake rev: 2a599812a57cb0b964880a6a2b7548423497ea92) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* command|cooker|event: add findConfigFilePath commandJoshua Lock2011-07-011-0/+8
| | | | | | | | | This takes the name of a .conf file and returns the full path to it (Bitbake rev: 22c8600b885faf841795b872d82f68dfb644a26e) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/event/ast: Add RecipePreFinalise eventRichard Purdie2011-06-091-3/+7
| | | | | | | | | | 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>
* Shift exception formatting into the UIChris Larson2011-06-081-0/+7
| | | | | | | | | | | | | Now we use bb.exceptions to pass pickleable traceback entries to the UI, and the UI is free to do whatever it wants to do with this information. By default, the log formatter for the UIs formats it with bb.exceptions. This also means that all exceptions should now show 3 lines of context and limit to 5 entries. (Bitbake rev: ee48d628ee038bd72e1cd94aa75f5ccbacbcee4c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake none/xmlrpc servers: Only send pickled events to the xmlrpc serverRichard Purdie2011-06-081-1/+4
| | | | | | | Only the xmlrpc server needs pickled events. Use the function names to signify this requirement. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* event: don't catch systemexit from handler executionChris Larson2011-06-021-1/+1
| | | | | | | | | | | | This means that anyone firing an event can get a systemexit and result in their process exiting, which isn't ideal, but behaves the way it used to (in particular, ensures that a sanity check failure will halt the build). This should be revisited in the future. (Bitbake rev: d6a0ffdd583be3df734171d7e91d334f798a79ce) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* event: improve output for syntax errors in handlersChris Larson2011-05-061-3/+9
| | | | | | | | | Note: this includes IndentationError, which is a subclass of SyntaxError. (Bitbake rev: 156ea134e82d873ca4b5343261da2291a2b32ef6) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* event: improve output when eventhandler exec failsChris Larson2011-05-061-11/+31
| | | | | | | | | | | | | | | | - Name the event handler by its actual name, so the traceback shows it rather than 'tmpHandler'. - Rather than immediately aborting when encountering an event handler error, display an error message and try to continue. - Show a traceback for ordinary exceptions, skipping the first entry in the traceback, so it only shows the useful information. - Show an error, but no traceback, for SystemExit with a code other than 0. - For for SystemExit with a code of 0, simply continue silently. (Bitbake rev: faf682dfc23b7ef2ece04f7d50f9741224bb3bb0) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* event: register event handler functions, not code objectsChris Larson2011-05-061-12/+10
| | | | | | | (Bitbake rev: be647dac9d458ee4b289ff5f66ed95b311d398d8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/event: fix some whitespace issuesJoshua Lock2011-02-241-3/+1
| | | | Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: implement command to find configuration files for a config variableJoshua Lock2011-02-241-0/+10
| | | | | | | | | Some configuration variables (MACHINE, MACHINE-SDK and DISTRO) set which confguration files bitbake should use. The added command , findConfigFiles, enables a UI to query which files are suitable values for a specified parameter. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: implement command to get all possible targets and their dependenciesJoshua Lock2011-02-241-0/+9
| | | | | | | | | | Add a new command generateTargetsTree() which returns a dependency tree of possible targets (tasks and recipes) as well as their dependency information. Optional parameter 'klass' also ensures any recipes which inherit the specified class path (i.e. 'classes/image.bbclass') are included in the model Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake: event/build: Drop stdout specific handling for python messages as ↵Richard Purdie2011-02-071-4/+0
| | | | | | this is no longer needed with newer log handling Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Inject taskpid into log records via our log handlerChris Larson2011-01-101-0/+4
| | | | | | | | | | | | It turns out that while log filters added with addFilter are only associated with that logger, and not its children, handlers are inherited, and handlers can be filters. So, let's add filtering to our existing LogHandler class which dispatches our log records as bitbake events. (Bitbake rev: 0153ace246e7c88366f45c8f035a2b4505a1c115) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update event queue handling to match upstream bitbakeRichard Purdie2011-01-101-2/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* event: use BBLogFormatter in print_ui_queueChris Larson2011-01-061-1/+2
| | | | | | | | | | This ensures that when a failure occurs very early on in bitbake startup, the message formatting ematches that used by the UIs. (Bitbake rev: c8ff0fd3e9f050a668f1a069cf37ee37db3664fa) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* event: fix unicode handler registrationBernhard Reutner-Fischer2011-01-041-1/+1
| | | | | | | (Bitbake rev: 413af91e56a6d2368f6cbe22c0e2a337e1289e55) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Sync a load of whitespace and other non-functionality changes with ↵Richard Purdie2011-01-041-1/+1
| | | | | | bitbake uptream Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Show the user progress when loading the cacheBob Foerster2011-01-041-0/+19
| | | | | | | | (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>
* event: use cPickle for eventsChris Larson2011-01-041-1/+4
| | | | | | | (Bitbake rev: b16c0c1dc3b7e03b02555e9803767a0d695e67f1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb.event: fix MsgBase ref in fire_class_handlersChris Larson2011-01-041-2/+1
| | | | | | | (Bitbake rev: db7f960e5f103a424a4319f1867fb540e643c1ec) 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-3/+1
| | | | | | | | | | | | 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>
* cache: sync the cache file to disk in the backgroundChris Larson2011-01-041-4/+16
| | | | | | | | | | | | | | | | 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>
* Fix syntax issue and don't include 'd' in ui_queueChris Larson2011-01-041-2/+2
| | | | | | | (Bitbake rev: bed8e09971dc577f5443ad3d89aa14634c54eb16) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Queue up events before the UI is spawnedChris Larson2011-01-041-0/+21
| | | | | | | | | | | | | | - Queue up any events fired to the UI before the UI exists - At exit, check if UIs exist, and if not, flush the queue of LogRecords to the console directly. - When establishing a connection from the UI to the server, flush the queue of events to the queue in the server connection, so the UI will receive them when it begins its event loop. (Bitbake rev: 73488aeb317ed306f2ecf99cc9d3708526a5933c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Turn Event into a new style classChris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: b42221cabeb1193ade134d1d3c0318203ab8eb93) 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-15/+3
| | | | | | | | | | | | | | | | | | 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/+49
| | | | | | | (Bitbake rev: 47ca82397bc395b598c6b68b24cdee9e0d8a76d8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Correctly route events from the worker to the serverRichard Purdie2010-08-201-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Switch to use subprocess for forking tasks and FAKEROOTENV to run ↵Richard Purdie2010-08-191-6/+5
| | | | | | shell and python under a fakeroot environment 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-1/+2
| | | | | | | (Bitbake rev: 36b980c16bf74b3c2066cc120f9f27e11f189a63) 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-2/+2
| | | | | | | (Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Import fixupsChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 4fa052f426e3205ebace713eaa22deddc0420e8a) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Formatting cleanupsChris Larson2010-07-021-3/+2
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Don't run metadata event handlers for bb.msg eventsChris Larson2010-07-021-0/+4
| | | | | | | (Bitbake rev: 297305b3742323d09d9ca58e958c4f18e945a148) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb.event: NotHandled and Handled are on the way outChris Larson2010-07-021-2/+6
| | | | | | | (Bitbake rev: ed35b30f8e09b0bfc15102fa6483c55d6b7d61de) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add & utilize a simple_exec utility functionChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 5ead16f14f996bcbb2fb14277b8ce5a9317b8160) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Consolidate the exec/eval bits, switch anonfunc to better_exec, etcChris Larson2010-07-021-2/+7
| | | | | | | | | | | | The methodpool, ${@} expansions, anonymous python functions, event handlers now all run with the same global context, ensuring a consistent environment for them. Added a bb.utils.better_eval function which does an eval() with the same globals as better_exec. (Bitbake rev: 424d7e267b009cc19b8503eadab782736d9597d0) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/event.py: Run class eventhandlers in the task context but ensure UI ↵Richard Purdie2010-03-251-8/+17
| | | | | | handlers run in the server context Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/event: If the server disappears, we just exit tooRichard Purdie2010-01-211-3/+6
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Switch to bitbake-dev version (bitbake master upstream)Richard Purdie2010-01-201-113/+98
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Sync various functions with those from bitbake-dev and bitbake upstreamRichard Purdie2009-11-131-0/+7
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* event.py: Revert accidental but harmless commitRichard Purdie2008-05-211-4/+0
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4529 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with upstreamRichard Purdie2008-05-191-0/+4
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4504 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update to bitbake 1.8 branch headRichard Purdie2008-03-031-0/+17
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3892 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update along 1.8 branchRichard Purdie2007-08-031-0/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2345 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update to 1.8.1 (inc. various bug fixes, epoch support)Richard Purdie2007-04-011-3/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1419 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with upstream. Richard Purdie2007-01-081-16/+15
| | | | | | | | | | | | | * File licence headers were sanitised causing most of the diff. * cooker.py was created from bin/bitbake. * cvs fetcher port option was added * The -f force option was fixed to work correctly * Multiple entries in rrecrdeps are now handled correctly (allows adding do_deploy to image depends) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1129 311d38ba-8fff-0310-9ca6-ca027cbcb966