]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake/runqueue.py: Ensure existing setscene stamp files are taken into account
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 May 2011 14:03:51 +0000 (15:03 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 May 2011 16:24:12 +0000 (17:24 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/runqueue.py

index deebe600283ebc72e85731170b92c6d0a4e8aad3..1729365f512d52087058e6424b83b69f258bc985 100644 (file)
@@ -1414,16 +1414,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])
@@ -1433,7 +1442,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])