summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
Commit message (Collapse)AuthorAgeFilesLines
...
* build: add missing newlineChris Larson2011-03-031-1/+1
| | | | | | | (Bitbake rev: a7aa0415bdaa458a941004bf8dd8bbfeddd6ef5a) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* build: switch to old cwd handlingChris Larson2011-03-031-3/+3
| | | | | | | | | We want this to ensure the user can run the run. script from anywhere. (Bitbake rev: a600b79ecefc95eeb266c3f362c7160fa8c948c1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/build.py: Fix TaskFailed parametersRichard Purdie2011-02-231-2/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: event/build: Drop stdout specific handling for python messages as ↵Richard Purdie2011-02-071-7/+0
| | | | | | this is no longer needed with newer log handling Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/build.py: When looking up extra stamp info for setscene tasks, use ↵Richard Purdie2011-01-271-2/+6
| | | | | | | | the real taskname (Fixed based on a bug reported by Dongxiao Xu <dongxiao.xu@intel.com>) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Introduce stamp-extra-info task flag into stamp filenamesDongxiao Xu2011-01-181-3/+9
| | | | | | | | | | | For certain tasks, we need additional information in build stamp file other than the task name and file name. stamp-extra-info is introduced as a task flag which is appended to the stamp file name. [Code simplifcations/tweaks from Richard] Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/build.py: Allow FuncFailed error to have an optional messageRichard Purdie2011-01-171-2/+5
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/build.py: Rename message field to avoid DeprecationWarning: ↵Richard Purdie2011-01-171-3/+3
| | | | | | BaseException.message warning Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* build: remove duplicate import of utilsBernhard Reutner-Fischer2011-01-121-1/+0
| | | | | | | (Bitbake rev: 86c6434f093ce5e55d1febfb424a8e595ffc2d17) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* *: use utils.remove() some moreBernhard Reutner-Fischer2011-01-121-4/+2
| | | | | | | (Bitbake rev: d3489b141cac1197324661680fe38b8a88bc49b4) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/build.py: Fix del_stamp work correctly after recent stamp function ↵Richard Purdie2011-01-071-1/+1
| | | | | | changes Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake build/siggen/runqueue: Fix stampfile parametersRichard Purdie2011-01-061-2/+3
| | | | | | | | The current parameters are not useful to the stampfile generator function as they can't uniquely define a task. This updated things so the parameters can identify unique tasks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake build.py: Stamp handling improvementsRichard Purdie2011-01-061-5/+11
| | | | | | | * Move stamp file deletion out of the internal stamp helper function * Add a new function to return the path to a stamp for a given task Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake build.py: Use localdata for stamp handling, not dRichard Purdie2011-01-061-2/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/build.py: Ditch the extract_stamp function as its just going to ↵Richard Purdie2011-01-061-10/+9
| | | | | | complicate improving the stamp handling functions Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* build: use logger.isEnabledFor, not getEffectiveLevelChris Larson2011-01-061-2/+2
| | | | | | | | | | I think this is less confusing, and avoids needing to know about the *range* of logging levels, instead simply asking what we really want to know. (Bitbake rev: dc2264387617586b5c0a61e126c75edde5e7abcd) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build.py: Logging of None was losing the logs so force this to ↵Richard Purdie2011-01-051-1/+1
| | | | | | stdout so we can see function execution failures Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Misc syncups with bitbake upstream, mostly whitespace and a missed ↵Richard Purdie2011-01-051-0/+1
| | | | | | line from the last UI commit Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: build.py logging updatesRichard Purdie2011-01-051-16/+23
| | | | | | | | | | | | python tasks calling shell functions using exec_func() would show the log file as /dev/null. It makes most sense for all the task logging to be setup centrally by exec_task(), at least with the current code base in Poky. This commit will need discussion in relation to upstream bitbake and the IO redirection could be better handled using a context manager (although task contexts shouldn't ever nest). Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Use os.devnull, not /dev/nullChris Larson2011-01-041-2/+1
| | | | | | | (Bitbake rev: ce5ab0fc524a1c2c48c4c39d6fc8aae23019207b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* build: fix FuncFailed for the no logfile caseChris Larson2011-01-041-6/+2
| | | | | | | (Bitbake rev: 3a4b5eb20e41bd3cecd9d7e8dff7d076d8a7bb9a) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* build: ensure LogTee has a valid name propertyChris Larson2011-01-041-9/+7
| | | | | | | (Bitbake rev: 0ebb46e25261cfc85aaef2790cba7c1ec057c306) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* build: fix -D with shell functionsChris Larson2011-01-041-4/+18
| | | | | | | (Bitbake rev: 1c8be64732fdf4f3a608c090b3dc92065d6058d6) 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-6/+8
| | | | | | | (Bitbake rev: ee1cce6ab21ddda60a7a070d03e98ff8485a5e71) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* build: use a contextmanager for locksChris Larson2011-01-041-13/+9
| | | | | | | | | | Also don't bother passing logfile to exec_func_python, at least until we start adding the logfile as a file handler to the bitbake logger. (Bitbake rev: f99ee4680c9f67b7ed13fc06044ba2382f9a782c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* build: use bb.process instead of os.systemChris Larson2011-01-041-180/+172
| | | | | | | | | | | | (Bitbake rev: 53740977521bc81ffa37adfa7bbeb8f2a80ea165) build: write logfiles per task, not per function Based on d14f9bf6 from poky, reworked for master and other cleanup. (Bitbake rev: beadff2eca1eb95f0411115dd72ddb4c3c44c604) 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>
* Simplify build exception handlingChris Larson2011-01-041-26/+26
| | | | | | | | | | | | | | | | - 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>
* Switch bitbake internals to use logging directly rather than bb.msgChris Larson2011-01-041-10/+16
| | | | | | | | | | | | | | 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>
* bitbake: Add support for 'noexec' tasksRichard Purdie2010-11-061-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/build.py: Write logfiles on a per task basis, not per functionRichard Purdie2010-10-111-71/+78
| | | | | | | | | Per function logging made it hard to track down what was happening so switch to logging on a per task basis. [BUGID #383] Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* build.py: Add a symlink for the loggingMark Hatle2010-10-011-0/+17
| | | | | | | | | | | [BUGID #375] When configuring for the log file output, we generate a symlink to the target filename. This link uses the same file naming, but without the active pid, making it easier to see which log file is the last one generated. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* bitbake/build.py: Set BB_FILENAME to represent the .bb file being built ↵Richard Purdie2010-09-131-1/+2
| | | | | | (including any virtual prefix) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/data.py: Add emit_func() and generate_dependencies() functionsRichard Purdie2010-08-311-1/+1
| | | | | | | | These functions allow generation of dependency data between funcitons and variables allowing moves to be made towards generating checksums and allowing use of the dependency information in other parts of bitbake. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Correctly route events from the worker to the serverRichard Purdie2010-08-201-1/+7
| | | | 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-23/+41
| | | | | | shell and python under a fakeroot environment Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/build.py: Note when calling functions that don't exist. Should ↵Richard Purdie2010-08-121-0/+1
| | | | | | probably error Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/build.py: Set the current taskname in the BB_CURRENTTASK variableRichard Purdie2010-08-121-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* *: Fix typo in documentationBernhard Reutner-Fischer2010-08-041-1/+1
| | | | | | | | | s/dictonary/dictionary/ (Bitbake rev: 0cc632761e75f66a8ce5ca2fe370f7551ccbfdf0) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/build.py: Add support for pre and postfuncs for tasksRichard Purdie2010-08-041-0/+6
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Switch a fatal usage to SystemExit ("T" not set)Chris Larson2010-07-021-1/+1
| | | | | | | | | | | This failure is one the *user* needs to see, as it may have to do with their setup, but where they don't need to see a traceback and all, since they're not developers, so I think SystemExit is appropriate here. (Bitbake rev: e3cc9bc7b6ef1a2eca78235790a051329bceb9a4) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop unnecessarly duplicated messages wrt FuncFailedChris Larson2010-07-021-4/+1
| | | | | | | (Bitbake rev: 9ec9c0e560d4fa6df74a90f598f9db92713525a2) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Don't try to expand non-string valuesChris Larson2010-07-021-13/+15
| | | | | | | (Bitbake rev: fe36a726b9f930bbd6fd758c0aee78559e95f02b) 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-2/+2
| | | | | | | (Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Switch some references to moved functionsChris Larson2010-07-021-3/+4
| | | | | | | (Bitbake rev: ddea2978cb969cf1381cfee5c055de0c9e56a4e3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Import fixupsChris Larson2010-07-021-1/+0
| | | | | | | (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-6/+5
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>