summaryrefslogtreecommitdiff
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
...
* Reduce bb.cache memory usage a bitChris Larson2011-01-041-2/+3
| | | | | | | | | | | | | - Don't store key/value pairs when the value is None - Delete the depends_cache when we're done with it This reduces the memory usage after sync on initial parse by roughly 11.5% on this machine. (Bitbake rev: c7eb4c989459d182fdf9c81a627d32b7ef11626b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix FuncFailed constructionChris Larson2011-01-041-2/+2
| | | | | | | (Bitbake rev: 085e66f9c14123ea2c0f1e34f7737cf77071f86d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Restore FuncFailed argument compatibilityChris Larson2011-01-041-5/+11
| | | | | | | (Bitbake rev: c07cc08f7fd503ac3013ccc43c79198c4c3b7b29) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Only reference logfiles that existChris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: 760f647ba044009150ee219869fc9dea171a7535) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix bitbake -k issue introduced by build exception cleanupChris Larson2011-01-041-2/+2
| | | | | | | | | | | | | | A SystemExit from a python function wasn't being raised as a FuncFailed, which resulted in it not being caught by the exception handlers in the runqueue for the worker process, which resulted in a SystemExit exit, rather than os._exit, which causes all manner of problems when used in a forked process. This fixes it by ensuring we raise a FuncFailed when seeing exceptions which aren't instances of Exception. (Bitbake rev: dafe92fe9f387450d9f9e9ff41c99388998b7495) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Don't show tracebacks for SystemExit or KeyboardInterruptChris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: d71984b3934c3dd9791c3bc00f332b79a1985a05) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix exit code display for task failureChris Larson2011-01-041-2/+4
| | | | | | | | | | | Per the python documentation, os.waitpid returns the exitcode shifted up by 8 bits, and we weren't compensating, resulting in a display of 'failed with 256' when a worker process exits with a code of 1. (Bitbake rev: 90c2b6cb24dc9c82f0a9aa9d23f2d1ed2e6ff301) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* FIXUP: runqueue bb.debug refsRichard Purdie2011-01-041-2/+2
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Simplify build exception handlingChris Larson2011-01-043-36/+30
| | | | | | | | | | | | | | | | - Drop EventException - Use FuncFailed as the primary function failure exception, using TaskFailed for the event (leaving it up to the process running exec_{func,task} to display the more detailed information available in the exception). - Switch InvalidTask to an exception rather than an event, as that's a critical issue. - Reduce the number of messages shown to the user when a task fails -- they don't need to be told it fails 12 times. Work remains in this area though. (Bitbake rev: 06b742aae2b8013cbb269cc30554cff89e3a5667) 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>
* Work around issue with pickling of traceback objectsChris Larson2011-01-041-0/+4
| | | | | | | (Bitbake rev: 82928613256bad92fde9f4071244a53e20fc89ee) 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>
* Apply fix for issue where the loggers were constructed with the wrong classChris Larson2011-01-041-1/+4
| | | | | | | (Bitbake rev: 1b21daf052c49f3126dac001712ec01ad63c5f60) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix providerlog NameErrorChris Larson2011-01-041-3/+3
| | | | | | | (Bitbake rev: 992e460f24d4da707c76d6e6d74d3684c9646279) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop 'fn' arguments to bb.msg functionsChris Larson2011-01-041-7/+7
| | | | | | | (Bitbake rev: 8341458e3d21b45db84e46bd32f8ad270000ce3c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add pending deprecation warnings to the bb.msg functionsChris Larson2011-01-041-2/+14
| | | | | | | (Bitbake rev: 60293a42b5500b6139bcd912bf294f862ef9936b) 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-0428-322/+374
| | | | | | | | | | | | | | 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-044-48/+57
| | | | | | | | | | | | | | | | | | 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-046-82/+143
| | | | | | | (Bitbake rev: 47ca82397bc395b598c6b68b24cdee9e0d8a76d8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Allow %20 in a file name in the SRC_URIC Michael Sundius2011-01-041-1/+2
| | | | | | | | (Bitbake rev: f7c181a0f6ab0b4d33bf80a0e24a788de441f82b) Signed-off-by: C Michael Sundius <msundius@sundius.com> 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>
* Make DataSmart inherit the MutableMapping ABCChris Larson2011-01-041-14/+20
| | | | | | | | | | | Provide __len__, __iter__, and the getitem/setitem/delitem methods, and its mixed in versions of keys(), values(), items(), etc will automatically behave, making the DataSmart act more like a real mapping. (Bitbake rev: 89b5351c656d263b0ce513cee043bc046d20a01e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Split out 'find next buildable task' into a separate generator functionChris Larson2011-01-041-7/+13
| | | | | | | | | | It needs to be a generator, so scheduler subclasses have the option to skip buildable tasks and return a later one. (Bitbake rev: a8c61e41bc6277222e4cde667ad0b24bd1597aa0) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Let the RunQueueScheduler control the number of active tasksChris Larson2011-01-041-12/+8
| | | | | | | (Bitbake rev: 1387423e747f59866fd1cb99a7d90605e668823f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add the ability to use runqueue schedulers from the metadataChris Larson2011-01-041-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | If you create a runqueue scheduler class in a python module, available in the usual python search path, you can now make it available to bitbake via the BB_SCHEDULERS variable, and the user can then select it as they select any other scheduler. Example usage: In a test.py I placed appropriately: import bb.runqueue class TestScheduler(bb.runqueue.RunQueueScheduler): name = "myscheduler" In local.conf, to make it available and select it: BB_SCHEDULERS = "test.TestScheduler" BB_SCHEDULER = "myscheduler" (Bitbake rev: 4dd38d5cfb80f9bb72bc41a629c3320b38f7314d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* misc: Update the email address to a working one.Holger Hans Peter Freyther2011-01-041-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix IndexError encountered when a 'depends' flag references a nonexistant taskChris Larson2011-01-041-1/+3
| | | | | | | (Bitbake rev: 4b0fd70539e73d99282fa89d47ad2d5f642ca4f4) 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>
* Make realfile optional for better_exec, using the existing fn in the code objectChris Larson2011-01-041-2/+4
| | | | | | | (Bitbake rev: 499a2d28d578cdd6df7cd30ccb79cc2b2796fb65) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* When shutting down, send SIGTERM, not SIGINTChris Larson2010-12-311-2/+2
| | | | | | | | | | | | SIGINT should be from the user, not a script. It also doesn't work as reliably to shut down processes, as it's not always interpreted as a termination request. In addition, it causes KeyboardInterrupt exceptions in the worker processes, which can interfere with our exception handling. (Bitbake rev: e5f6e0e9de4c6d1dfdd269d2bf7f83c00c415a27) Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb.utils: check if lock file is writable, to fix bug 606Yu Ke2010-12-301-0/+4
| | | | | | | | | | | | | | | | | | | | | Bug 606 report that if $DL_DIR is read-only, do_fetch will simply hang without any error message. The root cause is that: bb.fetch.go()->bb.utils.lockfile() will try to lock file ${DL_DIR}/xxxxx.lock. Since ${DL_DIR} is read-only, it will cause IOError exception. Although lockfile() can catch the exception, currently code simply ignore all the exception and continue the loop. it make sense if the exception is caused by locking contention, but in the read-only $DL_DIR case, it cause endless waiting unfortunately. So this patch add read-only check for lockfile to avoid the silent hang. Fix [BUGID #606] Signed-off-by: Yu Ke <ke.yu@intel.com>
* bitbake/depexp: fix early exitJoshua Lock2010-12-221-1/+1
| | | | | | | Stupdi typo/thinko from me had depexp exiting once recipes had parsed as I'd used a return the while loop where I'd meant a continue... Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake/fetch: Fix fetch errorRichard Purdie2010-12-211-3/+3
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* runqueue.py: set BB_TASKHASH approriately after moving to fork()Kevin Tian2010-12-211-1/+2
| | | | | | | | | In previous exec() model, cooker is re-initialized from scratch with environmental variable exported accordingly. Now in fork() model, environmental variables are not exported again, and thus original method to export BB_TASKHASH doesn't apply now which breaks all sstate packages. Now we can set data variable directly instead. Signed-off-by: Kevin Tian <kevin.tian@intel.com>
* bitbake/fetch: Only checksum downloads when they're first downloaded and a ↵Richard Purdie2010-12-211-5/+5
| | | | | | checksum is present Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/runqueue.py: Somehow the python environment mapping is failing so do ↵Richard Purdie2010-12-211-2/+8
| | | | | | it manually Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/fetch: Add missing return so if a checksum isn't present, it isn't ↵Richard Purdie2010-12-201-0/+1
| | | | | | checked Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/fetch: Checksum validity fixesRichard Purdie2010-12-201-11/+7
| | | | | | | | | If the checksum check failed, the .md5 stamp file would still have been created meaning subsequent builds would proceed with the corrupt file. Reorder the calls to avoid this. Also raise a specific error for the checksum not specified error case. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* FetchData: add SRC_URI checksumYu Ke2010-12-201-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add the per-recipe SRC_URI checksum verification. - SRC_URI format The format of SRC_URI checksum follow OE definition: 1. SRC_URI has single src SRC_URI = "http://some.domain/file.tar.gz" SRC_URI[md5sum] = "xxxxxxxxxxxxxxx" SRC_URI[sha256sum] = "xxxxxxxxxxxxxxxxxxxxxx" 2. SRC_URI has multiple src, every src need specify name SRC_URI = "http://some.domain/file1.tar.gz;name=name1 \ http://some.domain/file2.tar.gz;name=name2 " SRC_URI[name1.md5sum] = "xxxxxxxxxxxxxxx" SRC_URI[name1.sha256sum] = "xxxxxxxxxxxxxxxxxxxxxx" SRC_URI[name2.md5sum] = "xxxxxxxxxxxxxxx" SRC_URI[name2.sha256sum] = "xxxxxxxxxxxxxxxxxxxxxx" - SRC_URI checking invocation: the checksum checking is invoked in do_fetch phase, so it can be invoked manually by # bitbake -f -c fetch <recipe_name> if recipes has no SRC_URI checksum item, bitbake will show warning: " WARNING: Missing SRC_URI checksum for xxxx.tar.gz, consider to add SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072" SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768" " thus recipe author can add it to recpie file after SRC_URI - control variable BB_STRICT_CHECKSUM when SRC_URI checksum is missing, this variable decide pass or not if BB_STRICT_CHECKSUM = "1", bitbake should fatal in this case, otherwise bitbake just pass Signed-off-by: Yu Ke <ke.yu@intel.com>
* siggen.py: print taskname when seeing mismatched hash in cacheKevin Tian2010-12-201-1/+1
| | | | Signed-off-by: Kevin Tian <kevin.tian@intel.com>
* bitbake Revert bitbake exec() and go back to fork() for performace wins ↵Richard Purdie2010-12-172-60/+92
| | | | | | (first draft) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/runqueue: Revert previous setscene noexec changes and ensure ↵Richard Purdie2010-12-171-1/+3
| | | | | | setscene stamp exists for setscene noexec tasks Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/runqueue: Clean up message log levelsRichard Purdie2010-12-171-5/+5
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* siggen.py: make sure stamp directory existingKevin Tian2010-12-161-0/+2
| | | | | | or else "bitbake -S" from scratch may report "No such file or directory" error. Signed-off-by: Kevin Tian <kevin.tian@intel.com>
* bitbake/runqueue.py: We should just failoutright in scenequeue for noexec ↵Richard Purdie2010-12-161-4/+7
| | | | | | tasks, not skip them so stamps are created Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* runqueue.py: use correct task ID when checking validity of setscene tasksKevin Tian2010-12-141-5/+11
| | | | | | | | | | | | | | | | | | sstate hash validation is done at initialization of RunQueueExecuteScenequeue. However the index of 'valid' list returned from the validation doesn't correspond to setscene task ID. It's just an intermediate namespace between runqueue and sstate hash func. Use it as setscene task ID fully mess the flow. Previously this doesn't cause trouble because all setscene tasks are passed. Commit 58396a5d24c62710fd0a9f3780d84ac8a95d8e7c add 'noexec' concept to setscene tasks which grabs some tasks out of the list and thus trigger this problem Without this fix there're ~50 recipes (gzip-native, glib, ...) rebuilt weirdly with a minimal build, even though existing sstate packages could accelerate them. there's another typo using wrong task ID in a debug message which further hide this issue Signed-off-by: Kevin Tian <kevin.tian@intel.com>
* bitbake: add optional expansion to getVarFlag()Paul Eggleton2010-12-142-5/+8
| | | | | | | | Add a parameter to getVarFlag() to auto-expand the value of the flag. This makes getVarFlag() more consistent with getVar(), and allows expansion of vardeps and vardepsexclude (which has been done in this commit). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* bitbake: allow excluding dependencies of variablesPaul Eggleton2010-12-141-0/+1
| | | | | | | | | Adds a vardepsexclude flag that can be used to exclude a dependency of a variable (the opposite of vardeps). This will allow the exclusion of variables from the hash generation much more selectively than blanket whitelisting using BB_HASHBASE_WHITELIST. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* bitbake/bitbake-runtask: Since the parent has set the environment up cleanly ↵Richard Purdie2010-12-101-2/+2
| | | | | | we don't need to filter this ourselves anymore Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Overhaul environment handlingRichard Purdie2010-12-095-17/+48
| | | | | | | | | | | | | | Currently, anything whitelisted in the environment makes it into the worker processes. This is undesireable and the worker environment should be as clean as possible. This patch adapts bitbake sosme variables are loaded into bitbake's datastore but not exported by default. Any variable can be exported by setting its export flag. Currently, this code only finalises the environment in he worker as doing so in the server means variables are unavailable in the worker. If we switch back to fork() calls instead of exec() this code will need revisting. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>