Commit Graph

29 Commits

Author SHA1 Message Date
Richard Purdie 63e6ba8567 bitbake: Add support for .bbappend files (see mailing lists for detais)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-16 15:10:40 +01:00
Chris Larson ecbd5ca720 3.0 prep
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:37 +01:00
Chris Larson ef1de9ecaf Apply some 2to3 refactorings
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:37 +01:00
Chris Larson 8a9a4748c9 Kill the unnecessary setVarFlag debugging message
(Bitbake rev: ef8475796fbab4f76a72bbc106da4c35e3afe2e1)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 15:41:36 +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 0d25a516b4 Rename the finalise method for consistency
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>
2010-07-02 15:41:31 +01:00
Chris Larson c926e87f47 Resurrect merged anonfunc execution
(Bitbake rev: 0c2ed40277e157406ea25c858f14c3cebb73c21b)

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 94b60d1247 Consolidate the exec/eval bits, switch anonfunc to better_exec, etc
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>
2010-07-02 15:41:31 +01:00
Chris Larson c244243274 Implement BBVERSIONS
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>
2010-03-25 17:25:45 +00: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 f03769280c bitbake: [parse] In ast, make StatementGroup inherit list, and add a AstNode base class.
(Bitbake rev: 7ea31b2842b45ffe1ca688f55207f8676442a108)

Signed-off-by: Chris Larson <clarson@mvista.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:57 +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 3f1ca0a086 bitbake: [parse] Move the last method to the AST...
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:48 +00:00
Holger Freyther baf2395900 bitbake: [parser] Move more methods to the ast scheme
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:48 +00:00
Holger Freyther d84b7c5555 bitbake: [parser] Move one more item to the ast
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:47 +00:00
Holger Freyther a5bb5d625e bitbake: [parser] Move methodflags over to the ast
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:46 +00:00
Richard Purdie 7cfe3a5e15 bitbake: [parser] Build fix
(Bitbake rev: 9c97696f37499b4d0ec5c034c51e4cf6bc425ba2)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:45 +00:00
Holger Freyther 8eaaf663ba bitbake: [parser] Move more statements over the two phase AST
Create the data first, then evaluate on the data dict

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:44 +00:00
Holger Freyther d2bf3f00ea bitbake: [parse] Change handling include through the AstNode
Disable the recursively evaluating the statement for now
as it is causing problems.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:43 +00:00
Holger Freyther 8072cf0846 bitbake: [parser] Call eval and remove non ast code
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:42 +00:00
Holger Freyther 118161f46b bitbake: [parser] Call eval immeditaley to test this code
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:41 +00:00
Holger Freyther a20105868f bitbake: [parser] Prepare to cease out getFunc
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>
2010-02-15 17:07:40 +00:00
Richard Purdie 269d4d58a9 bitbake: [parser] Preserve include vs. require behaviour
(Bitbake rev: 6073a5b8e4ca8af8e1a8e0234fad7b08baf76c99)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:07:20 +00:00
Holger Freyther 71a19386a3 bitbake: [parser] Firs set of AST nodes with construction and eval
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>
2010-02-15 17:07:07 +00:00
Holger Freyther 4320386deb bitbake: [parser] Move the finalise into the ast as well
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-02-15 17:06:55 +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