From c373727bd0551651621cb83ee934f84e58aa9ee1 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 27 May 2011 15:03:51 +0100 Subject: bitbake/runqueue.py: Ensure existing setscene stamp files are taken into account JaMa reported issues where bitbake would rebuild things instead of using the existing built tasks. This was tracked to a case where: a) rm_work is uses b) A depends on B c) B has a version change (e.g. PR bump) and A *and* B would then rebuild. It turns out that rm_work was correctly turning stamp files into the correct _setscene varients but bitbake was then ignoring them during setscene processing. If the correct sstate checksumed files didn't exist, everything would seemingly rebuild. The fix is to check for existing *_setscene stamps and if present, honour them. If "basichash" is enabled, the hash is included with the stamps so everything should then function as intended. (Bitbake rev: 0a4d857aabc86b973170ba9ce32b6b449a4e2165) Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 6ca14ec9de..028d8b58e3 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1451,16 +1451,25 @@ class RunQueueExecuteScenequeue(RunQueueExecute): sq_taskname = [] sq_task = [] noexec = [] + stamppresent = [] for task in xrange(len(self.sq_revdeps)): realtask = self.rqdata.runq_setscene[task] fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]] taskname = self.rqdata.runq_task[realtask] taskdep = self.rqdata.dataCache.task_deps[fn] + if 'noexec' in taskdep and taskname in taskdep['noexec']: noexec.append(task) self.task_skip(task) bb.build.make_stamp(taskname + "_setscene", self.rqdata.dataCache, fn) continue + + if self.rq.check_stamp_task(realtask, taskname + "_setscene"): + logger.debug(2, 'Setscene stamp current for task %s(%s)', task, self.rqdata.get_user_idstring(realtask)) + stamppresent.append(task) + self.task_skip(task) + continue + sq_fn.append(fn) sq_hashfn.append(self.rqdata.dataCache.hashfn[fn]) sq_hash.append(self.rqdata.runq_hash[realtask]) @@ -1470,7 +1479,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.configuration.data } valid = bb.utils.better_eval(call, locs) - valid_new = [] + valid_new = stamppresent for v in valid: valid_new.append(sq_task[v]) -- cgit v1.2.3-54-g00ecf