summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/parse_py/BBHandler.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-03-19 17:22:19 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-03-25 17:25:45 +0000
commitc24424327409544807a781bba4e6f9a8e178dcce (patch)
tree5df97b6f8665f6cdf9a9698c05e2a98f58bd5975 /bitbake/lib/bb/parse/parse_py/BBHandler.py
parentcefeeb1aa30a9d8744a6ff9c51811ebc8d18c735 (diff)
downloadpoky-c24424327409544807a781bba4e6f9a8e178dcce.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/BBHandler.py')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py26
1 files changed, 2 insertions, 24 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 4641c13d9c..262c883c95 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -152,30 +152,8 @@ def handle(fn, d, include):
152 classes.remove(__classname__) 152 classes.remove(__classname__)
153 else: 153 else:
154 if include == 0: 154 if include == 0:
155 safe_d = d 155 return ast.multi_finalize(fn, d)
156 d = bb.data.createCopy(safe_d) 156
157 try:
158 ast.finalise(fn, d)
159 except bb.parse.SkipPackage:
160 bb.data.setVar("__SKIPPED", True, d)
161 darray = {"": d}
162
163 extended = bb.data.getVar("BBCLASSEXTEND", d, True)
164 if extended:
165 bb.data.setVar("BBCLASSEXTEND", extended, safe_d)
166
167 for cls in (extended or "").split():
168 pn = data.getVar('PN', d, True)
169 variant_d = bb.data.createCopy(safe_d)
170 data.setVar('PN', pn + '-' + cls, variant_d)
171 inherit([cls], variant_d)
172 try:
173 ast.finalise(fn, variant_d)
174 except bb.parse.SkipPackage:
175 bb.data.setVar("__SKIPPED", True, variant_d)
176 darray[cls] = variant_d
177 return darray
178
179 if oldfile: 157 if oldfile:
180 bb.data.setVar("FILE", oldfile, d) 158 bb.data.setVar("FILE", oldfile, d)
181 159