summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/parse_py/ConfHandler.py
Commit message (Collapse)AuthorAgeFilesLines
* parse/ConfHandler: Fix enthusiatic export regexp matchingRichard Purdie2012-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | The export regexp was only meant to catch values like: export VARIABLENAME however after the stricter quoting patch was applied, it was also matching variables like: export BAR=foo and setting the export flag on a variable called "BAR=foo". The = character is an invalid variable name character. This patch tightens up the regexp match so it only matches the intended character set and only matches variable names. (Bitbake rev: 6d1765c2eac8c1958ceb9c81d55d04a9bc961cb1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/ConfHandler: Be more strict about variable quotingRichard Purdie2012-02-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, bitbake will accept variables in the forms: X = 1 X = '1 \ X = "1" X = '1' which will all set X=1. This patch removes the first two possibilities and makes quoting mandatory. There is little metadata out there which doesn't quote properly and bitbake will exit with an error about the exact line number and file with any problem so users can easily identify and fix issues. OE-Core has already been checked/fixed. The motivation for this is being able to give sane errors if a user does something like: IMAGE_INSTALL += # tslib mtd-utils" which currently gives a really nasty failure. (Bitbake rev: a8ae80741fea5e0ec0fb9a52a963a4baa38d2564) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: add file and line number to ParseErrorPaul Eggleton2012-02-231-5/+6
| | | | | | | | | | | 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-9/+9
| | | | 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>
* 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>
* parse: pass filename, lineno into the astChris Larson2011-01-101-4/+4
| | | | | | | | | | | 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>
* 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>
* Switch bitbake internals to use logging directly rather than bb.msgChris Larson2011-01-041-2/+3
| | | | | | | | | | | | | | 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>
* 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-021-1/+1
| | | | | | | (Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Import fixupsChris Larson2010-07-021-1/+1
| | | | | | | (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>
* Stop using functions via 'bb' that were moved from there to other modulesChris Larson2010-07-021-1/+2
| | | | | | | (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>
* Implement ??= operatorChris Larson2010-03-221-1/+1
| | | | | | | | | | | | | | | | | ??= 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>
* 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: [parser] Make resolve_file only resolve the pathHolger Freyther2010-02-151-1/+2
| | | | | | | | 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] Remove the "data" from feeder, evaluate after parsing a fileHolger Freyther2010-02-151-10/+14
| | | | | | | | | 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: [parser] Cary a Statement Node through the parsingHolger Freyther2010-02-151-9/+9
| | | | | | | | | 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-52/+5
| | | | 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] Unify opening a file...Holger Freyther2010-02-101-21/+2
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: [parser] Kill obtain/localpath from the parserHolger Freyther2010-02-101-50/+1
| | | | | | | | | 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-3/+10
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Merge further fixes from upstream 1.8 branchRichard Purdie2009-05-111-0/+7
| | | | | | | | * 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>
* bitbake/bitbake-dev: Sync with upstreamRichard Purdie2008-09-301-1/+0
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5346 311d38ba-8fff-0310-9ca6-ca027cbcb966
* ConfHandler.py: revert accidental commitRichard Purdie2008-09-161-0/+1
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5197 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake parse/__init_.py: Add missing update_mtime function fixing bitbake ↵Richard Purdie2008-09-161-1/+0
| | | | | | shell reparse failures git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5196 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with 1.8 upstream branchRichard Purdie2007-09-051-0/+6
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2689 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with upstreamRichard Purdie2007-08-111-3/+5
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2480 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update along 1.8 branchRichard Purdie2007-08-031-4/+7
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2345 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update to 1.8.1 (inc. various bug fixes, epoch support)Richard Purdie2007-04-011-5/+11
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1419 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with upstream. Richard Purdie2007-01-081-16/+19
| | | | | | | | | | | | | * File licence headers were sanitised causing most of the diff. * cooker.py was created from bin/bitbake. * cvs fetcher port option was added * The -f force option was fixed to work correctly * Multiple entries in rrecrdeps are now handled correctly (allows adding do_deploy to image depends) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1129 311d38ba-8fff-0310-9ca6-ca027cbcb966
* Confhandler.py: Add cleanup from bitbake trunkRichard Purdie2006-11-271-6/+3
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@962 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Upgrade from 1.4 -> 1.7.4ishRichard Purdie2006-11-161-17/+16
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@863 311d38ba-8fff-0310-9ca6-ca027cbcb966
* Update bitbake to latest bitbake svnRichard Purdie2006-02-101-3/+16
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@262 311d38ba-8fff-0310-9ca6-ca027cbcb966
* Initial populationRichard Purdie2005-08-311-0/+199
git-svn-id: https://svn.o-hand.com/repos/poky@2 311d38ba-8fff-0310-9ca6-ca027cbcb966