From c24424327409544807a781bba4e6f9a8e178dcce Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 19 Mar 2010 17:22:19 -0700 Subject: 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 : 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/cache.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bitbake/lib/bb/cache.py') diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 43091daa26..9a962ecc74 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -143,8 +143,8 @@ class Cache: if dep not in self.depends_cache[fn]["__depends"]: self.depends_cache[fn]["__depends"].append(dep) - # Make sure BBCLASSEXTEND always makes the cache too - self.getVar('BBCLASSEXTEND', virtualfn, True) + # Make sure the variants always make it into the cache too + self.getVar('__VARIANTS', virtualfn, True) self.depends_cache[virtualfn]["CACHETIMESTAMP"] = bb.parse.cached_mtime(fn) @@ -199,7 +199,7 @@ class Cache: self.cacheValidUpdate(fn) if self.cacheValid(fn): - multi = self.getVar('BBCLASSEXTEND', fn, True) + multi = self.getVar('__VARIANTS', fn, True) for cls in (multi or "").split() + [""]: virtualfn = self.realfn2virtual(fn, cls) if self.depends_cache[virtualfn]["__SKIPPED"]: @@ -292,7 +292,7 @@ class Cache: self.clean[fn] = "" # Mark extended class data as clean too - multi = self.getVar('BBCLASSEXTEND', fn, True) + multi = self.getVar('__VARIANTS', fn, True) for cls in (multi or "").split(): virtualfn = self.realfn2virtual(fn, cls) self.clean[virtualfn] = "" @@ -443,7 +443,7 @@ class Cache: # Touch this to make sure its in the cache self.getVar('__BB_DONT_CACHE', file_name, True) - self.getVar('BBCLASSEXTEND', file_name, True) + self.getVar('__VARIANTS', file_name, True) def load_bbfile( self, bbfile , config): """ -- cgit v1.2.3-54-g00ecf