diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2011-01-18 16:18:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-18 12:50:04 +0000 |
commit | 80cf3e405c923ed95dd09936739e816dbdd92299 (patch) | |
tree | 62082943bf06a2df18722b911bf93dea05e43bfe /bitbake/lib/bb/cache.py | |
parent | 740ea68258282c459b66bbed550e6347fb8e83a3 (diff) | |
download | openembedded-core-80cf3e405c923ed95dd09936739e816dbdd92299.tar.gz openembedded-core-80cf3e405c923ed95dd09936739e816dbdd92299.tar.bz2 openembedded-core-80cf3e405c923ed95dd09936739e816dbdd92299.zip |
bitbake: Introduce stamp-extra-info task flag into stamp filenames
For certain tasks, we need additional information in build stamp file
other than the task name and file name. stamp-extra-info is introduced as
a task flag which is appended to the stamp file name.
[Code simplifcations/tweaks from Richard]
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
-rw-r--r-- | bitbake/lib/bb/cache.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 9a2e2d5298..262f574f51 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -43,7 +43,7 @@ except ImportError: logger.info("Importing cPickle failed. " "Falling back to a very slow implementation.") -__cache_version__ = "134" +__cache_version__ = "135" recipe_fields = ( 'pn', @@ -55,6 +55,7 @@ recipe_fields = ( 'provides', 'task_deps', 'stamp', + 'stamp_extrainfo', 'broken', 'not_world', 'skipped', @@ -102,6 +103,11 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)): for task in tasks) @classmethod + def flaglist(cls, flag, varlist, metadata): + return dict((var, metadata.getVarFlag(flag, var, True)) + for var in varlist) + + @classmethod def getvar(cls, var, metadata): return metadata.getVar(var, True) or '' @@ -148,6 +154,7 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)): broken = cls.getvar('BROKEN', metadata), not_world = cls.getvar('EXCLUDE_FROM_WORLD', metadata), stamp = cls.getvar('STAMP', metadata), + stamp_extrainfo = cls.flaglist('stamp-extra-info', tasks, metadata), packages_dynamic = cls.listvar('PACKAGES_DYNAMIC', metadata), depends = cls.depvar('DEPENDS', metadata), provides = cls.depvar('PROVIDES', metadata), @@ -562,6 +569,7 @@ class CacheData(object): self.task_queues = {} self.task_deps = {} self.stamp = {} + self.stamp_extrainfo = {} self.preferred = {} self.tasks = {} self.basetaskhash = {} @@ -583,6 +591,7 @@ class CacheData(object): self.pkg_pepvpr[fn] = (info.pe, info.pv, info.pr) self.pkg_dp[fn] = info.defaultpref self.stamp[fn] = info.stamp + self.stamp_extrainfo[fn] = info.stamp_extrainfo provides = [info.pn] for provide in info.provides: |