summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: Update users of getVar/setVar to use the data store functions directlyRichard Purdie2011-11-274-63/+63
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parse_py: Use absolute paths for FILERichard Purdie2011-11-182-2/+2
| | | | | | | | | | | | 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/ast: include class name when arguments given in variantPaul Eggleton2011-07-251-6/+8
| | | | | | | | | | | For multilib this produces variants of e.g. "multilib:lib64" instead of just "lib64"; however we set BBEXTENDVARIANT to "lib64" and the latter will be used when composing filenames for multilib. (Bitbake rev: de7a2b91512bb3ab058f5eb5cd188acd2b8a2220) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parse/ConfHandler: Fix multiline variable corruptionRichard Purdie2011-07-211-1/+1
| | | | | | | | | | | | | | | When parsing multiline variables in conf files, the last character can be accidentally removed. s2 contains new data read from the file which may or may not end with the continuation character. It makes sense to let the next loop iteration strip this if needed. We don't often use multiline expressions in .conf files which is why I'd imagine we haven't noticed this before. Most variables are quoted and its the closing quotation which often disappears. (Bitbake rev: 09a9146262d58dfe4a2ea4270026b90ae33f6c91) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/ast: Fix ??= vs. ?= handlingRichard Purdie2011-07-051-2/+2
| | | | | | | | | | As the code stands, setting a variable with ??= could result in a ?= variable not overriding it. This patch fixes the issue by allowing the ast to make lookups that ignore any ??= set variables. (Bitbake rev: 32fee2e650dfdd3aa9a7572dad1251e0c24ca34b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/ast: Add optional argument for BBCLASSEXTENDRichard Purdie2011-06-281-3/+21
| | | | | | | | | | | | | Add an optional argument to BBCLASSEXTEND entries which gets passed to the extention class as BBEXTENDVARIANT. Also add BBEXTENDCURR whic is set to the current extension class name. This mode functions slightly differently to the previous BBCLASSEXTEND code in that PN is not changed. (Bitbake rev: 8d3c899e0a15840c54de26d2f1fc552430517778) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/ast: Call expandkeys after the RecipePreFinalise eventRichard Purdie2011-06-281-2/+1
| | | | | | | | | This means the event handler can change variables such as PN and those changes will be reflected in the updated variable key names. (Bitbake rev: 664b85742d1afc94b291a85fd245abebffacdf3d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/event/ast: Add RecipePreFinalise eventRichard Purdie2011-06-091-6/+9
| | | | | | | | | | One of the implications is we need to register the event handlers before executing the anonymous python functions. I can't find any issue with making that change in any existing metadata use cases. (Bitbake rev: a981df3cc9bf410d24f39919959952bdc6c76d03) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/parse/ast: We always need to finalize the default data since ↵Richard Purdie2011-06-091-2/+1
| | | | | | | | otherwise overrides to BBCLASSEXTEND may not be applied (Bitbake rev: f22ac9149cc9ab96510bb377deb82cd9bceb95c1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* track skipped packagesPaul Eggleton2011-06-091-6/+6
| | | | | | | | | | | | | Add skiplist to cooker that allows access to the list of packages skipped via SkipPackage (this includes COMPATIBLE_MACHINE, INCOMPATIBLE_LICENSE, etc.) This can be used to enhance error reporting. (From Poky rev: 6c12b7b1099c77b87d4431d55e949cf7c5f52ded) (Bitbake rev: 7d2363f35350be27a33f568c23eb07fcd3d27e53) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* parse: pass a useful (if mangled) key to bb.data.expand for :=Chris Larson2011-06-071-1/+1
| | | | | | | (Bitbake rev: 8e1be0ca414d9d26e013ae212abdd9c39fa8df26) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/ast.py: Only run finalise() for the specified variantRichard Purdie2011-05-051-2/+6
| | | | | | | Allows the heavy finalise function to only be run for the case we're interested in when running tasks, saving some processing time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/data_smart: Improve the way lazyassignment worksRichard Purdie2011-02-231-8/+0
| | | | | | | | | | | | | | | | | | | | Currently, if a variable has been set with ??= and the code looks it up before the data finalisation phase, no value is found. This is causes serious problems for anonymous python functions which manipulate data, or for the fetcher revision handling code where revisions can be set with ??=. There is also a significant performance implication for processing lazy assignment in finalise. Moving the check for a default value into getVarFlag addresses both the timing issue and the performace. This change gives a 7% real time performance improvement to parsing the Poky metadata. The cost of the check at this point is minimal since we have all the data flags available. This should also fix Yocto bug 752. 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-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>
* 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-061-6/+5
| | | | | | | (Bitbake rev: 0b11a3d4eab84b372fd45b9537cf0327008daf8d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ConfHandler: commentary typo fixesBernhard Reutner-Fischer2011-01-041-3/+3
| | | | | | | (Bitbake rev: 089dc31932a85455ed0fec8209d0451af4310f94) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* 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>
* parse: Use constants from stat instead of magic numbersBernhard Reutner-Fischer2011-01-041-3/+4
| | | | | | | (Bitbake rev: bcabe2dfb587042e139890329ff52d9bb9201cf4) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Sync a load of whitespace and other non-functionality changes with ↵Richard Purdie2011-01-041-4/+3
| | | | | | bitbake uptream Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* parse: use bb.utils.whichChris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: 2bc893dc407bf608cac7e12673161b75b712da83) Signed-off-by: Chris Larson <chris_larson@mentor.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-044-12/+23
| | | | | | | | | | | | | | 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/siggen: Ensure full signature data is not held unless needed, ↵Richard Purdie2010-09-291-2/+2
| | | | | | reducing memory consumption Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Implement signaturesRichard Purdie2010-09-032-3/+7
| | | | | | Includes functionality to find out what changes between two different singature data dumps. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/ast: Ensure function definitions are always added to the dictonaryRichard Purdie2010-09-031-4/+4
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/data.py: Add emit_func() and generate_dependencies() functionsRichard Purdie2010-08-311-0/+2
| | | | | | | | 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/BBHandler: Save python functions into the dictonaryRichard Purdie2010-08-312-5/+10
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Add support for .bbappend files (see mailing lists for detais)Richard Purdie2010-07-161-1/+5
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* 3.0 prepChris Larson2010-07-023-7/+12
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply some 2to3 refactoringsChris Larson2010-07-021-6/+7
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* 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>