mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 12:49:34 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
740ea68258
commit
80cf3e405c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user