diff options
| -rw-r--r-- | bitbake/lib/bb/event.py | 11 | ||||
| -rw-r--r-- | bitbake/lib/bb/runqueue.py | 14 |
2 files changed, 25 insertions, 0 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 31e7c2a4d2..0454c75332 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
| @@ -670,6 +670,17 @@ class ReachableStamps(Event): | |||
| 670 | Event.__init__(self) | 670 | Event.__init__(self) |
| 671 | self.stamps = stamps | 671 | self.stamps = stamps |
| 672 | 672 | ||
| 673 | class StaleSetSceneTasks(Event): | ||
| 674 | """ | ||
| 675 | An event listing setscene tasks which are 'stale' and will | ||
| 676 | be rerun. The metadata may use to clean up stale data. | ||
| 677 | tasks is a mapping of tasks and matching stale stamps. | ||
| 678 | """ | ||
| 679 | |||
| 680 | def __init__(self, tasks): | ||
| 681 | Event.__init__(self) | ||
| 682 | self.tasks = tasks | ||
| 683 | |||
| 673 | class FilesMatchingFound(Event): | 684 | class FilesMatchingFound(Event): |
| 674 | """ | 685 | """ |
| 675 | Event when a list of files matching the supplied pattern has | 686 | Event when a list of files matching the supplied pattern has |
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 3008b7ad4f..80d7f6ca6b 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
| @@ -2781,6 +2781,20 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq): | |||
| 2781 | 2781 | ||
| 2782 | update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True) | 2782 | update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True) |
| 2783 | 2783 | ||
| 2784 | # Compute a list of 'stale' sstate tasks where the current hash does not match the one | ||
| 2785 | # in any stamp files. Pass the list out to metadata as an event. | ||
| 2786 | found = {} | ||
| 2787 | for tid in rqdata.runq_setscene_tids: | ||
| 2788 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | ||
| 2789 | stamps = bb.build.find_stale_stamps(taskname, rqdata.dataCaches[mc], taskfn) | ||
| 2790 | if stamps: | ||
| 2791 | if mc not in found: | ||
| 2792 | found[mc] = {} | ||
| 2793 | found[mc][tid] = stamps | ||
| 2794 | for mc in found: | ||
| 2795 | event = bb.event.StaleSetSceneTasks(found[mc]) | ||
| 2796 | bb.event.fire(event, cooker.databuilder.mcdata[mc]) | ||
| 2797 | |||
| 2784 | def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True): | 2798 | def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True): |
| 2785 | 2799 | ||
| 2786 | tocheck = set() | 2800 | tocheck = set() |
