summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cache.py
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2011-01-18 16:18:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-18 12:50:04 +0000
commit80cf3e405c923ed95dd09936739e816dbdd92299 (patch)
tree62082943bf06a2df18722b911bf93dea05e43bfe /bitbake/lib/bb/cache.py
parent740ea68258282c459b66bbed550e6347fb8e83a3 (diff)
downloadpoky-80cf3e405c923ed95dd09936739e816dbdd92299.tar.gz
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.py11
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:
43 logger.info("Importing cPickle failed. " 43 logger.info("Importing cPickle failed. "
44 "Falling back to a very slow implementation.") 44 "Falling back to a very slow implementation.")
45 45
46__cache_version__ = "134" 46__cache_version__ = "135"
47 47
48recipe_fields = ( 48recipe_fields = (
49 'pn', 49 'pn',
@@ -55,6 +55,7 @@ recipe_fields = (
55 'provides', 55 'provides',
56 'task_deps', 56 'task_deps',
57 'stamp', 57 'stamp',
58 'stamp_extrainfo',
58 'broken', 59 'broken',
59 'not_world', 60 'not_world',
60 'skipped', 61 'skipped',
@@ -102,6 +103,11 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
102 for task in tasks) 103 for task in tasks)
103 104
104 @classmethod 105 @classmethod
106 def flaglist(cls, flag, varlist, metadata):
107 return dict((var, metadata.getVarFlag(flag, var, True))
108 for var in varlist)
109
110 @classmethod
105 def getvar(cls, var, metadata): 111 def getvar(cls, var, metadata):
106 return metadata.getVar(var, True) or '' 112 return metadata.getVar(var, True) or ''
107 113
@@ -148,6 +154,7 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
148 broken = cls.getvar('BROKEN', metadata), 154 broken = cls.getvar('BROKEN', metadata),
149 not_world = cls.getvar('EXCLUDE_FROM_WORLD', metadata), 155 not_world = cls.getvar('EXCLUDE_FROM_WORLD', metadata),
150 stamp = cls.getvar('STAMP', metadata), 156 stamp = cls.getvar('STAMP', metadata),
157 stamp_extrainfo = cls.flaglist('stamp-extra-info', tasks, metadata),
151 packages_dynamic = cls.listvar('PACKAGES_DYNAMIC', metadata), 158 packages_dynamic = cls.listvar('PACKAGES_DYNAMIC', metadata),
152 depends = cls.depvar('DEPENDS', metadata), 159 depends = cls.depvar('DEPENDS', metadata),
153 provides = cls.depvar('PROVIDES', metadata), 160 provides = cls.depvar('PROVIDES', metadata),
@@ -562,6 +569,7 @@ class CacheData(object):
562 self.task_queues = {} 569 self.task_queues = {}
563 self.task_deps = {} 570 self.task_deps = {}
564 self.stamp = {} 571 self.stamp = {}
572 self.stamp_extrainfo = {}
565 self.preferred = {} 573 self.preferred = {}
566 self.tasks = {} 574 self.tasks = {}
567 self.basetaskhash = {} 575 self.basetaskhash = {}
@@ -583,6 +591,7 @@ class CacheData(object):
583 self.pkg_pepvpr[fn] = (info.pe, info.pv, info.pr) 591 self.pkg_pepvpr[fn] = (info.pe, info.pv, info.pr)
584 self.pkg_dp[fn] = info.defaultpref 592 self.pkg_dp[fn] = info.defaultpref
585 self.stamp[fn] = info.stamp 593 self.stamp[fn] = info.stamp
594 self.stamp_extrainfo[fn] = info.stamp_extrainfo
586 595
587 provides = [info.pn] 596 provides = [info.pn]
588 for provide in info.provides: 597 for provide in info.provides: