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>
This commit is contained in:
Chris Larson
2010-03-19 17:22:19 -07:00
committed by Richard Purdie
parent cefeeb1aa3
commit c244243274
4 changed files with 133 additions and 29 deletions

View File

@@ -152,30 +152,8 @@ def handle(fn, d, include):
classes.remove(__classname__)
else:
if include == 0:
safe_d = d
d = bb.data.createCopy(safe_d)
try:
ast.finalise(fn, d)
except bb.parse.SkipPackage:
bb.data.setVar("__SKIPPED", True, d)
darray = {"": d}
return ast.multi_finalize(fn, d)
extended = bb.data.getVar("BBCLASSEXTEND", d, True)
if extended:
bb.data.setVar("BBCLASSEXTEND", extended, safe_d)
for cls in (extended or "").split():
pn = data.getVar('PN', d, True)
variant_d = bb.data.createCopy(safe_d)
data.setVar('PN', pn + '-' + cls, variant_d)
inherit([cls], variant_d)
try:
ast.finalise(fn, variant_d)
except bb.parse.SkipPackage:
bb.data.setVar("__SKIPPED", True, variant_d)
darray[cls] = variant_d
return darray
if oldfile:
bb.data.setVar("FILE", oldfile, d)