Commit Graph

36 Commits

Author SHA1 Message Date
Richard Purdie da56e3df88 parse_py: Use absolute paths for FILE
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>
2012-01-30 16:16:11 +00:00
Richard Purdie 1df5ab5ee2 parse/ConfHandler: Fix multiline variable corruption
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>
2011-07-21 11:09:47 +01:00
Chris Larson b127874ee6 parse: pass filename, lineno into the ast
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>
2011-01-10 13:24:03 +00:00
Bernhard Reutner-Fischer 641fc9bad0 ConfHandler: commentary typo fixes
(Bitbake rev: 089dc31932a85455ed0fec8209d0451af4310f94)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 15:00:25 +00:00
Chris Larson ecc68fa4fb Switch bitbake internals to use logging directly rather than bb.msg
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>
2011-01-04 14:46:33 +00:00
Chris Larson dc39ebe91e Move the unset BBPATH sanity check after the bblayers processing
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>
2010-07-02 15:41:33 +01:00
Chris Larson 1180bab54e Apply some 2to3 transforms that don't cause issues in 2.6
(Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:33 +01:00
Chris Larson 1c74fd768f Import fixups
(Bitbake rev: 4fa052f426e3205ebace713eaa22deddc0420e8a)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 7acc132cac Formatting cleanups
(Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 6623d79ada Stop using functions via 'bb' that were moved from there to other modules
(Bitbake rev: 03a6c26f8da226f442c3cab557e4733f7cd6eeac)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:32 +01:00
Chris Larson 87f62d7c8d Ensure we always utilize the correct messaging domains
(Bitbake rev: 92a2e2e90981c0615171abe03645a772d84f6986)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:31 +01:00
Chris Larson 57044b9a62 Implement ??= operator
??= 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>
2010-03-22 15:02:59 +00:00
Chris Larson 73a12b9184 Error early if BBPATH is unset, rather than falling back to share/bitbake
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>
2010-03-22 14:56:00 +00:00
Holger Freyther 7b57ad901a bitbake: [parser] Make resolve_file only resolve the path
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>
2010-02-15 17:07:55 +00:00
Holger Freyther 793c88dd92 bitbake: [parser] Remove the "data" from feeder, evaluate after parsing a file
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>
2010-02-15 17:07:51 +00:00
Holger Freyther 4b25b519ae bitbake: [parser] Cary a Statement Node through the parsing
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>
2010-02-15 17:06:50 +00:00
Holger Freyther 5bac3403d7 bitbake: [parser] Move evaluating into the ast class...
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:06:36 +00:00
Martin Jansa d5519d4ad9 bitbake: parse_py/ConfHandler.py: missing colon after else
(Bitbake rev: d520ae0764016906ff61ec33b14eabc908aa8408)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-10 16:38:33 +00:00
Richard Purdie 7a4579e7cb bitbake: ConfHandler: Fix require vs. include behaviour
(Bitbake rev: 824a032672c8673cae28e492aa916a4750b94efa)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-10 16:38:00 +00:00
Holger Freyther fb918a7582 bitbake: [parser] Move more stuff out the feeder
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-10 16:37:43 +00:00
Holger Freyther 913e78898e bitbake: [parse] Unify opening a file...
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-10 16:31:33 +00:00
Holger Freyther 242a03607d bitbake: [parser] Kill obtain/localpath from the parser
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>
2010-02-10 16:31:19 +00:00
Richard Purdie 22c29d8651 bitbake: Switch to bitbake-dev version (bitbake master upstream)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-20 18:46:02 +00:00
Richard Purdie 107a9da006 bitbake: Merge further fixes from upstream 1.8 branch
* 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>
2009-05-11 22:41:17 +01:00
Richard Purdie 221ac2b25f bitbake/bitbake-dev: Sync with upstream
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5346 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-09-30 20:46:17 +00:00
Richard Purdie cd937b6f45 ConfHandler.py: revert accidental commit
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5197 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-09-16 20:09:03 +00:00
Richard Purdie 31511eb978 bitbake parse/__init_.py: Add missing update_mtime function fixing bitbake shell reparse failures
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5196 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-09-16 19:14:49 +00:00
Richard Purdie 899c451a73 bitbake: Sync with 1.8 upstream branch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2689 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-05 07:48:15 +00:00
Richard Purdie 18026165c3 bitbake: Sync with upstream
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2480 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-11 22:42:15 +00:00
Richard Purdie bfc70eb24e bitbake: Update along 1.8 branch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2345 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-03 13:40:52 +00:00
Richard Purdie 7371e6323c bitbake: Update to 1.8.1 (inc. various bug fixes, epoch support)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1419 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-04-01 15:04:49 +00:00
Richard Purdie f5665d5bfc bitbake: Sync with upstream.
* 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
2007-01-08 23:53:01 +00:00
Richard Purdie 1e95d39948 Confhandler.py: Add cleanup from bitbake trunk
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@962 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-27 09:10:38 +00:00
Richard Purdie 306b7c7a97 bitbake: Upgrade from 1.4 -> 1.7.4ish
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@863 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-16 15:02:15 +00:00
Richard Purdie 62dc8f47b3 Update bitbake to latest bitbake svn
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@262 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-02-10 10:11:32 +00:00
Richard Purdie f54da734eb Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@2 311d38ba-8fff-0310-9ca6-ca027cbcb966
2005-08-31 10:47:56 +00:00