summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/parse_py/BBHandler.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: Revert "BBHandler: Ensure parser state engine is correctly reset ↵Richard Purdie2012-12-071-3/+2
| | | | | | | | for new parsing" This reverts commit 1a4ea02932d07c437187f67ac5b6e25ad76ee84a. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: BBHandler: Ensure parser state engine is correctly reset for new ↵Richard Purdie2012-12-071-2/+3
| | | | | | | | | | | parsing The classes variable in particular could be in an odd state if parsing of a previous recipe had abruptly ended. (Bitbake rev: 1a4ea02932d07c437187f67ac5b6e25ad76ee84a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: methodpool: Clean up the parsed module list handling to be slightly ↵Richard Purdie2012-08-231-1/+1
| | | | | | | | | | | | less insane This removes some dubious functions and replaces them with a simpler, cleaner API which better describes what the code is doing. Unused code/variables are removed and comments tweaked. (Bitbake rev: f1e943aebfb84e98253f3f21646d6765c4fa1d66) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* BBHandler: Tweak some data store access methods to the preferred syntaxRichard Purdie2012-05-251-4/+4
| | | | | | (Bitbake rev: d7ec0f90354e60c415a01429bf26746c1d63b7ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parse/ast: Expand inherit statements before splitting themRichard Purdie2012-03-151-1/+1
| | | | | | | | | | | | | | This means that statements that expand to more then one entry such as: CLASSES = "a b" inherit ${CLASSES} work correctly instead of trying to inherit a class called "a b". (Bitbake rev: 2568e9ace6e6f483e1bf2a9ef2f4d8318d6c85b7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: add file and line number to ParseErrorPaul Eggleton2012-02-231-4/+2
| | | | | | | | | | | Ensure that a file and line number are reported for ParseError where possible. This helps particularly in the case of inherit and require which previously did not report either of these upon failure. (Bitbake rev: f588ba69622a2df35417ced184e56c79ac1b40d5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update users of getVar/setVar to use the data store functions directlyRichard Purdie2011-11-271-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parse_py: Use absolute paths for FILERichard Purdie2011-11-181-1/+1
| | | | | | | | | | | | Its possible for relative paths to creep into FILE. These confuse the build system no end as its not clear where they might be releative to. This patch ensures we always use resolved absolute paths for FILE so that things behave in a deterministic way. (Bitbake rev: 658d7daa70e46c2b20973b90ee53f0bbadc8bf5d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Fix typos in local.conf.sample and local.conf.sample.extendedRobert Yang2011-10-111-1/+0
| | | | | | | | | | | | | | | | Fixes bug [YOCTO #1667] Fix typos in local.conf.sample and local.conf.sample.extended: differernt -> different chages -> changes complation -> compilation egde -> edge "an an" -> "as an" images's -> image's Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Correctly handle multiline comments including whitespaceRichard Purdie2011-08-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | If metadata contains: """ FOO = "bar" """ The variable FOO should get set to "bar" but doesn't due to the empty lines be swallowed by the parser and FOO becomming part of the multiline comment. This patch corrects that behaviour so FOO is set as expected. [YOCTO #1377] This patch fixes parsing of multiline comments so lines ending with \ behave consistently and we warn users where there is something happening they likely don't expect. (Bitbake rev: 30eaef7f50fff855cf8830772a7088dd83a4240e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/BBHandler: Improve handling of multiline comments and warn users of ↵Richard Purdie2011-02-221-2/+11
| | | | | | the change Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* 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>
* parse: pass filename, lineno into the astChris Larson2011-01-101-7/+8
| | | | | | | | | | | 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>
* BBHandler: use basename directly in handler()Bernhard Reutner-Fischer2011-01-041-2/+2
| | | | | | | (Bitbake rev: 739a8ce6ac688061afd55cd3c980d0e9e45c5930) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* BBHandler: use os.path in inherit()Bernhard Reutner-Fischer2011-01-041-1/+1
| | | | | | | (Bitbake rev: 5b85de2c71973ba490b95a5d9ab634635f395142) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* BBHandler: simplify supports()Bernhard Reutner-Fischer2011-01-041-1/+2
| | | | | | | (Bitbake rev: 858d704d713d15bf97053eb1374758c74b0d8874) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Switch bitbake internals to use logging directly rather than bb.msgChris Larson2011-01-041-4/+5
| | | | | | | | | | | | | | 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/BBHandler: Save python functions into the dictonaryRichard Purdie2010-08-311-2/+3
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* 3.0 prepChris Larson2010-07-021-4/+5
| | | | 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>
* 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>
* Apply some 2to3 transforms that don't cause issues in 2.6Chris Larson2010-07-021-3/+3
| | | | | | | (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>
* Import fixupsChris Larson2010-07-021-3/+3
| | | | | | | (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-1/+1
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Implement BBVERSIONSChris Larson2010-03-251-24/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* bitbake: [parser] Make resolve_file only resolve the pathHolger Freyther2010-02-151-3/+4
| | | | | | | | 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-151-17/+22
| | | | | | | | | 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-151-21/+3
| | | | | | | (Bitbake rev: fda0707d772e0964a0185d4ec4d016522f6972f3) Signed-off-by: Chris Larson <clarson@mvista.com> 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-151-43/+2
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Cary a Statement Node through the parsingHolger Freyther2010-02-151-15/+16
| | | | | | | | | 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-151-128/+11
| | | | 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] Move inherit handling to methodHolger Freyther2010-02-101-4/+6
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parsers] Move out more functionsHolger Freyther2010-02-101-70/+78
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move more stuff out to separate methods...Holger Freyther2010-02-101-20/+25
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Move the handling of a method to a functionHolger Freyther2010-02-101-11/+15
| | | | | | | | We want to convert this into a proper AST. So move all such operations to methods... Later change them to generate a node... and create that node from here. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parse] Unify opening a file...Holger Freyther2010-02-101-16/+2
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Kill obtain/localpath from the parserHolger Freyther2010-02-101-4/+2
| | | | | | | | | With obtain it was possible to use an existing fetcher to download a bb or config file. In practive no one has used it and it was likely broken in regard to depends_cache... Remove it for now, simplfiy the code. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Switch to bitbake-dev version (bitbake master upstream)Richard Purdie2010-01-201-12/+20
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/BBHandler: Only add do_ prefix to tasks if its not already presentRichard Purdie2009-12-181-1/+2
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Sync various functions with those from bitbake-dev and bitbake upstreamRichard Purdie2009-11-131-1/+3
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Anonymous funciton improvements - use methodpool to allow cached ↵Richard Purdie2009-10-131-12/+17
| | | | | | code and remove anonymous function indentation mismatch problems Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Remove unused and hence pointless internal__functions__ variableRichard Purdie2009-10-131-7/+0
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Merge further fixes from upstream 1.8 branchRichard Purdie2009-05-111-6/+0
| | | | | | | | * Make the test functionality work * Optimise BBPATH handling when changing directory * Optimise file globing for BBFILES Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>