summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/build.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/build.py
parent740ea68258282c459b66bbed550e6347fb8e83a3 (diff)
downloadopenembedded-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/build.py')
-rw-r--r--bitbake/lib/bb/build.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 722639f3bb..e723c7ea85 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -386,14 +386,16 @@ def stamp_internal(taskname, d, file_name):
"""
if file_name:
stamp = d.stamp[file_name]
+ extrainfo = d.stamp_extrainfo[file_name].get(taskname) or ""
else:
stamp = d.getVar('STAMP', True)
file_name = d.getVar('BB_FILENAME', True)
+ extrainfo = d.getVarFlag(taskname, 'stamp-extra-info', True) or ""
if not stamp:
return
- stamp = bb.parse.siggen.stampfile(stamp, file_name, taskname)
+ stamp = bb.parse.siggen.stampfile(stamp, file_name, taskname, extrainfo)
bb.utils.mkdirhier(os.path.dirname(stamp))
@@ -420,8 +422,12 @@ def del_stamp(task, d, file_name = None):
stamp = stamp_internal(task, d, file_name)
bb.utils.remove(stamp)
-def stampfile(taskname, d):
- return stamp_internal(taskname, d, None)
+def stampfile(taskname, d, file_name = None):
+ """
+ Return the stamp for a given task
+ (d can be a data dict or dataCache)
+ """
+ return stamp_internal(taskname, d, file_name)
def add_tasks(tasklist, d):
task_deps = data.getVar('_task_deps', d)