summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse
Commit message (Collapse)AuthorAgeFilesLines
...
* Kill the unnecessary setVarFlag debugging messageChris Larson2010-07-021-1/+0
| | | | | | | (Bitbake rev: ef8475796fbab4f76a72bbc106da4c35e3afe2e1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* parser: fix harmless typo in variable nameBernhard Reutner-Fischer2010-07-021-4/+4
| | | | | | | | | s/absolsute/absolute/ (Bitbake rev: 837c84ce47c298316b941a5f3d2479bd2643686b) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: use a set() for __dependsBernhard Reutner-Fischer2010-07-021-2/+2
| | | | | | | | | | to make updating depends easier/more intuitive/eventually faster (Bitbake rev: f7c69462b8ba726861898817cc5b13174c78e35a) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Make the file not found error actually useable.Chris Larson2010-07-021-3/+5
| | | | | | | (Bitbake rev: 1cfcbee014478eb129ed382c13622317412b036e) 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-1/+1
| | | | | | | (Bitbake rev: fe36a726b9f930bbd6fd758c0aee78559e95f02b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move the unset BBPATH sanity check after the bblayers processingChris Larson2010-07-021-4/+1
| | | | | | | | | | This way we can fully utilize bblayers, you can do everything in bblayers.conf and avoid setting any environment variables at all. (Bitbake rev: 5def1c8c31432968349f9b29d6333d7962260a8b) 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-024-7/+7
| | | | | | | (Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Deprecate the usage of certain objects via certain modulesChris Larson2010-07-021-1/+1
| | | | | | | | | | | | As an example, this displays a deprecation warning for the use of "bb.encodeurl" when you should be using "bb.fetch.encodeurl". It includes a convenience function for this purpose. It should be of use when moving objects between modules permanently, changing the API the user sees. (Bitbake rev: 78f56049ba863b2e585b89db12b32697eb879bbc) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop __all__ usageChris Larson2010-07-022-4/+0
| | | | | | | (Bitbake rev: b4983cc7bfe5300c1d2904f34fb03d4fb2f41d90) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Import fixupsChris Larson2010-07-023-4/+5
| | | | | | | (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-023-3/+3
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Stop using functions via 'bb' that were moved from there to other modulesChris Larson2010-07-022-2/+4
| | | | | | | (Bitbake rev: 03a6c26f8da226f442c3cab557e4733f7cd6eeac) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Ensure we always utilize the correct messaging domainsChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 92a2e2e90981c0615171abe03645a772d84f6986) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Rename the finalise method for consistencyChris Larson2010-07-021-4/+4
| | | | | | | | | Apparently the finalise spelling is becoming less common in British English. (Bitbake rev: 47449b2fc433e5725839ca4f7e9bca931a475838) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Resurrect merged anonfunc executionChris Larson2010-07-021-4/+9
| | | | | | | (Bitbake rev: 0c2ed40277e157406ea25c858f14c3cebb73c21b) 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-30/+6
| | | | | | | | | | | | 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>
* Implement BBVERSIONSChris Larson2010-03-252-24/+116
| | | | | | | | | | | | | | | | | | | | | | | | This implements a feature similar to BBCLASSEXTEND, but for generating multiple versions of a given recipe. For example: BBVERSIONS = "1.0 2.0 git". In addition to the above, one can utilize [a-b] style patterns, and can have a :<basever> postfix, which allows you to essentially name the range of versions. Both the current version and the basever end up in OVERRIDES, and the basever gets placed into the BPV variable. The default BPV, if none is specified, is the original PV of the recipe, before bbversions processing. In this way, you can do things like: BBVERSIONS = "1.0.[0-6]:1.0.0+ 1.0.[7-9]:1.0.7+" SRC_URI_append_1.0.7+ = "file://some_extra_patch.patch;patch=1" Or you can create a recipe per range, and name the recipe file as such: nano_1.0.7+.bb. (Bitbake rev: 4ee9a56e16f1eb3c1649eaa3127b09ab0e93d1ec) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix issues with BBCLASSEXTEND set by anonymous python, and rename some ↵Chris Larson2010-03-221-14/+16
| | | | | | | | | variables to improve code clarity (Bitbake rev: 3062e96181fe845cfd286990b0216888ddd3d228) Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Implement ??= operatorChris Larson2010-03-222-1/+12
| | | | | | | | | | | | | | | | | ??= is a lazy, conditional assignment. Whereas a ?= immediately assigns to the variable if the variable has not yet been set, ??= does not apply the default assignment until the end of the parse. As a result, the final ??= for a given variable is used, as opposed to the first as in ?=. Note that the initial implementation relies upon finalise() to apply the defaults, so a "bitbake -e" without specifying a recipe will not show the defaults as set by ??=. Moving application of the default into getVar adds too large a performance hit. We may want to revisit this later. (Bitbake rev: 74f50fbca194c9c72bd2a540f4b9de458cb08e2d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Re-getVar BBCLASSEXTEND after finalise()Chris Larson2010-03-221-3/+2
| | | | | | | | | | This ensures that an anonymous python function is able to manipulate the BBCLASSEXTEND contents, and, therefore, amend.inc files are able to add to it. (Bitbake rev: c7d038d404afaf4ce3735af5134163759da6f6ef) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Error early if BBPATH is unset, rather than falling back to share/bitbakeChris Larson2010-03-221-5/+1
| | | | | | | | | | Better to error as early as possible rather than experience strange behavior resulting from the use of the largely useless stock bitbake.conf/base.bbclass. (Bitbake rev: 641e6cf3ec3ab4d26929cf4d2a3704ff07eed4d6) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parse] In ast, make StatementGroup inherit list, and add a AstNode ↵Chris Larson2010-02-151-22/+13
| | | | | | | | | base class. (Bitbake rev: 7ea31b2842b45ffe1ca688f55207f8676442a108) Signed-off-by: Chris Larson <clarson@mvista.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parse] Use bb.which in resolve_fileChris Larson2010-02-151-7/+3
| | | | | | | (Bitbake rev: 3cd06ed487ee0617892f154cff461379a323a1fb) Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Make resolve_file only resolve the pathHolger Freyther2010-02-153-16/+12
| | | | | | | | Do not attempt to open the file in the resolve_file method (a lot like bb.which... maybe bb.which can be used). This way we don't need to open/close a file which we have already parsed. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Cache parsed .inc and .bbclass files for a parse speedupHolger Freyther2010-02-151-14/+23
| | | | | | | Have a growing dict with .inc and .bbclass'es. This avoids to reparse files we have already seen. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] prepare to cache some .bbcclass and .inc filesHolger Freyther2010-02-151-11/+18
| | | | | | | | | Our parser is shit but instead to replace it now we will see how long we can drive the wave by caching parsed files. This will not go through the feeder again but we can just reevaluate the StatementGroup. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Remove the "data" from feeder, evaluate after parsing a fileHolger Freyther2010-02-154-64/+51
| | | | | | | | | Evaluate the statements after having parsed one file. This is referred to as "entwirren" and we can remove the direct evaluation and postpone a bit, in the future we can use a cached copy instead of parsing the original. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parse] Move vars_from_file from bb.parse.BBHandler into bb.parse.Chris Larson2010-02-152-21/+23
| | | | | | | (Bitbake rev: fda0707d772e0964a0185d4ec4d016522f6972f3) Signed-off-by: Chris Larson <clarson@mvista.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parse] Don't use relative import of parse_py.Chris Larson2010-02-151-1/+1
| | | | | | | (Bitbake rev: 0a2bb3dd790e3e40867195f14f4e174f98f8a47c) Signed-off-by: Chris Larson <clarson@mvista.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parse] Move the last method to the AST...Holger Freyther2010-02-151-1/+10
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move more methods to the ast schemeHolger Freyther2010-02-151-31/+48
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move one more item to the astHolger Freyther2010-02-151-34/+41
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move methodflags over to the astHolger Freyther2010-02-151-15/+23
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Build fixRichard Purdie2010-02-151-2/+2
| | | | | | (Bitbake rev: 9c97696f37499b4d0ec5c034c51e4cf6bc425ba2) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move more statements over the two phase ASTHolger Freyther2010-02-151-17/+40
| | | | | | Create the data first, then evaluate on the data dict Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parse] Change handling include through the AstNodeHolger Freyther2010-02-151-8/+2
| | | | | | | Disable the recursively evaluating the statement for now as it is causing problems. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Call eval and remove non ast codeHolger Freyther2010-02-151-2/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Call eval immeditaley to test this codeHolger Freyther2010-02-151-33/+4
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Prepare to cease out getFuncHolger Freyther2010-02-151-12/+17
| | | | | | | getFunc is now a method of the data node, hopefully we can kill the other version soon. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Preserve include vs. require behaviourRichard Purdie2010-02-151-3/+7
| | | | | | (Bitbake rev: 6073a5b8e4ca8af8e1a8e0234fad7b08baf76c99) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Firs set of AST nodes with construction and evalHolger Freyther2010-02-151-0/+78
| | | | | | | | First set of ConfHandling with AST nodes. The include can use a speed up and things might need to be migrated... into this class. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Add documentation about usage of this codeHolger Freyther2010-02-151-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move the finalise into the ast as wellHolger Freyther2010-02-152-43/+41
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Cary a Statement Node through the parsingHolger Freyther2010-02-154-79/+92
| | | | | | | | | When parsing we will collect a number of statements that can be evaluated...The plan is to be evaluate things twice (old+new) and then compare the result, it should be the same. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move evaluating into the ast class...Holger Freyther2010-02-153-180/+207
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: BBHandler: pass lineno and fn to handleMethodKhem Raj2010-02-101-2/+2
| | | | | | | | | | | * lineno and fn are needed in handleMethod to restore the functionality as it was before. (Bitbake rev: ac6792045959cfee56279c1c4597521e990848e7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: parse_py/ConfHandler.py: missing colon after elseMartin Jansa2010-02-101-1/+1
| | | | | | (Bitbake rev: d520ae0764016906ff61ec33b14eabc908aa8408) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: ConfHandler: Fix require vs. include behaviourRichard Purdie2010-02-101-1/+4
| | | | | | (Bitbake rev: 824a032672c8673cae28e492aa916a4750b94efa) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move more stuff out the feederHolger Freyther2010-02-101-38/+48
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parse] Move inherit handling to methodHolger Freyther2010-02-101-4/+6
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>