diff options
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 95f1dcfcb7..f912a6bfe1 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -458,6 +458,24 @@ def del_stamp(task, d, file_name = None): | |||
458 | stamp = stamp_internal(task, d, file_name) | 458 | stamp = stamp_internal(task, d, file_name) |
459 | bb.utils.remove(stamp) | 459 | bb.utils.remove(stamp) |
460 | 460 | ||
461 | def write_taint(task, d, file_name = None): | ||
462 | """ | ||
463 | Creates a "taint" file which will force the specified task and its | ||
464 | dependents to be re-run the next time by influencing the value of its | ||
465 | taskhash. | ||
466 | (d can be a data dict or dataCache) | ||
467 | """ | ||
468 | import uuid | ||
469 | if file_name: | ||
470 | taintfn = d.stamp[file_name] + '.' + task + '.taint' | ||
471 | else: | ||
472 | taintfn = d.getVar('STAMP', True) + '.' + task + '.taint' | ||
473 | bb.utils.mkdirhier(os.path.dirname(taintfn)) | ||
474 | # The specific content of the taint file is not really important, | ||
475 | # we just need it to be random, so a random UUID is used | ||
476 | with open(taintfn, 'w') as taintf: | ||
477 | taintf.write(str(uuid.uuid4())) | ||
478 | |||
461 | def stampfile(taskname, d, file_name = None): | 479 | def stampfile(taskname, d, file_name = None): |
462 | """ | 480 | """ |
463 | Return the stamp for a given task | 481 | Return the stamp for a given task |