summaryrefslogtreecommitdiff
path: root/bitbake/lib
Commit message (Collapse)AuthorAgeFilesLines
* Inject taskpid into log records via our log handlerChris Larson2011-01-102-8/+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/runqueue.py: Fix del_stamp calls and -f option to bitbake with the ↵Richard Purdie2011-01-101-5/+6
| | | | | | BasicHash siggen code Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"Yu Ke2011-01-101-3/+3
| | | | | | | | we should cache SRCREV whenever possible, the only exception is when SREREV is auto rev. so change the logic to only set __BB_DONT_CACHE at SRCREV = "${AUTOREV}" case Signed-off-by: Yu Ke <ke.yu@intel.com>
* Fetcher: break the "SRCREVINACTION" deadlockYu Ke2011-01-106-53/+18
| | | | | | | | | | | | | | | | | | | | | Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}=@bb.fetch.get_srcrev(): get_srcrev()->setup_localpath()->srcrev_internal_helper() ->evaluate SRCREV->get_srcrev() current fetcher resolve the deadlock by introducing a "SRCREVINACTION" condition check. Althoguh it works, it is indeed not clean. This patch use antoehr idea to break the deadlock: break the dependency among SRCREV and get_srcrev(), i.e. assign a specific keyword "AUTOINC" to AUTOREV. when Fetcher meet this keyword, it will check and set the latest revision to urldata.revision. get_srcrev later can use the urldata.revision for value evaluation(SRCPV etc). In this case, SRCREV no longer depends on get_srcrev, and there is not deadlock anymore. Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2.bzr: add bzr urldata_initYu Ke2011-01-101-2/+5
| | | | | | | move the bzr specific urldata init from localpath to urldata_init so that it can be called early Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2.hg: add hg urldata_initYu Ke2011-01-101-5/+9
| | | | | | | move the hg specific urldata init from localpath to urldata_init so that it can be called early Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2.svn.py: add urldata_initYu Ke2011-01-101-1/+5
| | | | | | | move the svn specific urldata init from localpath to urldata_init so that it can be called early Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2.git.py: add git urldata_initYu Ke2011-01-101-4/+9
| | | | | | | move the git specific urldata init from localpath to urldata_init so that it can be called early Signed-off-by: Yu Ke <ke.yu@intel.com>
* bb.fetch2: add urldata_init call for Fetch classYu Ke2011-01-101-0/+2
| | | | | | | | | | | FetchData has some fetch method specific data, and only fetch method knows how to initialize it. originally it is mostly initialized in Fetch.localpath(). But now there is requirement to call Fetch.latest_revision() before Fetch.localpath(), thus require another earlier place for initialization. so urldata_init is introduced for this purpose. it will be called in FetchData:__init__ and make all the Fetch functions useable after that. Signed-off-by: Yu Ke <ke.yu@intel.com>
* BBHandler: remove bb.fetch referrenceYu Ke2011-01-101-1/+1
| | | | | | BBHandler.py no longer use bb.fetch, so remove its import statement Signed-off-by: Yu Ke <ke.yu@intel.com>
* bitbake: For poky only, force the use of fetch2 codebaseRichard Purdie2011-01-101-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Switch to fetch2 fetcher code based on the environment variable ↵Richard Purdie2011-01-101-0/+3
| | | | | | BBFETCH2 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb.fetch2: replace bb.fetch with bb.fetch2 in the bb.fetchYu Ke2011-01-1013-44/+44
| | | | | | | | bb.fetch2 is copied from bb.fetch, and has many bb.fetch referrence. Fix these referrence with bb.fetch2 referrence Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch/git: Add backwards compatibility code for branch name handlingRichard Purdie2011-01-101-2/+80
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: copy bb.fetch to bb.fetch2 as initial code base for fetcher overhaulYu Ke2011-01-1013-0/+2636
| | | | | Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/codeparser: Fix import to match upstream bitbakeRichard Purdie2011-01-101-1/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: show the actual exception in better_execChris Larson2011-01-101-6/+4
| | | | | | | (Bitbake rev: a148e6a63c842ac586ac1dddbd9008f93cdea297) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqueue.py: Drop unneeded import and improve quieterrors handling as per ↵Richard Purdie2011-01-101-3/+5
| | | | | | upstream bitbake Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update event queue handling to match upstream bitbakeRichard Purdie2011-01-102-6/+3
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/runqueue.py: Sync with changes in upstream bitbakeRichard Purdie2011-01-101-90/+80
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch: Sync up logger/whitespace improvementsRichard Purdie2011-01-101-10/+13
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/utils.py: Drop unused function extend_deps()Richard Purdie2011-01-101-11/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Sync environment handling function names and comments with upstream ↵Richard Purdie2011-01-102-13/+13
| | | | | | alterations Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parse: pass filename, lineno into the astChris Larson2011-01-103-60/+68
| | | | | | | | | | | We will be needing this information to improve the tracebacks of python code from the metadata, as well as to give the user information about where variables were defined, so they know how it ended up the way it is. (Bitbake rev: 9615c538b894f71a2d1a0ba6b3f260db91e75786) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cache: don't expand variables for skipped recipesChris Larson2011-01-101-10/+13
| | | | | | | | | | | Errors can result from these expansions, but for skipped recipes, we shouldn't care about those failures. This fixes the same issue which Richard Purdie fixed in poky, commit 847b717. (Bitbake rev: 96ee6840010c1ae1080e6bf7ff0f4eb2d361e84b) Signed-off-by: Chris Larson <chris_larson@mentor.com> 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/__init__.py: Add taskpid to all LogRecords (subclassed to be ↵Richard Purdie2011-01-081-0/+8
| | | | | | | | BBLogRecords) This allows us to identify which task messages are from. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/msg.py: Add named definitions for all logging levelsRichard Purdie2011-01-081-6/+11
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/runqueue.py: Remove duplicate TaskStarted event fire()Richard Purdie2011-01-071-2/+0
| | | | 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/cooker.py: Fix merge conflict with upstream which was preventing ↵Richard Purdie2011-01-071-6/+5
| | | | | | clean bitbake shutdown Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/cache.py: Expansion of variables in skipped recipes should not be ↵Richard Purdie2011-01-071-1/+10
| | | | | | attempted as they can trigger errors Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/data.py: corrected the output for shell syntax.Lianhao Lu2011-01-071-1/+3
| | | | | | | | | | | [BUGID# 645], modify the emit_var() 1. Added "#" to the beginning of each line if the comment contains multiple lines. 2. Added "\" to the end of each line if the shell variable value contains multiple lines. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
* bitbake/siggen.py: Add a signature generator which adds the hash to the ↵Richard Purdie2011-01-071-0/+11
| | | | | | stamp files Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/runqueue.py: Fix a bug where do_setscene dependencies would be ignoredRichard Purdie2011-01-061-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake build/siggen/runqueue: Fix stampfile parametersRichard Purdie2011-01-063-9/+10
| | | | | | | | 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>
* parse.ast: drop __word__ regular expressionChris Larson2011-01-061-4/+3
| | | | | | | | | We can use the string split method for this instead. (Bitbake rev: aa9646717b3ee1006628246a7c495f601e62391c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parse.ast: avoid code duplication for inheritChris Larson2011-01-062-11/+6
| | | | | | | (Bitbake rev: 0b11a3d4eab84b372fd45b9537cf0327008daf8d) Signed-off-by: Chris Larson <chris_larson@mentor.com> 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>
* 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-053-5/+1
| | | | | | line from the last UI commit Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Resurrect alternative UIsBob Foerster2011-01-056-89/+298
| | | | | | | | | | | | | | | | 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>
* 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>
* bitbake: Fix process.py to accept None as the log optionRichard Purdie2011-01-051-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Update persist_data usage to the new APIChris Larson2011-01-051-18/+15
| | | | | | | (Bitbake rev: 9723a1c474b72b096c5a3136bf446ed69f3a749e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* persist_data: resurrect the lock wait for selectsChris Larson2011-01-051-7/+7
| | | | | | | | | Think this got inadvertantly dropped when switching to the new API. (Bitbake rev: 628c5159d1151b89f2b7210c8819489e8dc9a84d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>