summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index a9ba02d34f..a0a7dd4e12 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -494,6 +494,24 @@ def del_stamp(task, d, file_name = None):
494 stamp = stamp_internal(task, d, file_name) 494 stamp = stamp_internal(task, d, file_name)
495 bb.utils.remove(stamp) 495 bb.utils.remove(stamp)
496 496
497def write_taint(task, d, file_name = None):
498 """
499 Creates a "taint" file which will force the specified task and its
500 dependents to be re-run the next time by influencing the value of its
501 taskhash.
502 (d can be a data dict or dataCache)
503 """
504 import uuid
505 if file_name:
506 taintfn = d.stamp[file_name] + '.' + task + '.taint'
507 else:
508 taintfn = d.getVar('STAMP', True) + '.' + task + '.taint'
509 bb.utils.mkdirhier(os.path.dirname(taintfn))
510 # The specific content of the taint file is not really important,
511 # we just need it to be random, so a random UUID is used
512 with open(taintfn, 'w') as taintf:
513 taintf.write(str(uuid.uuid4()))
514
497def stampfile(taskname, d, file_name = None): 515def stampfile(taskname, d, file_name = None):
498 """ 516 """
499 Return the stamp for a given task 517 Return the stamp for a given task