summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-27 15:03:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-27 17:55:51 +0100
commitc373727bd0551651621cb83ee934f84e58aa9ee1 (patch)
treeb8d19e8093e09049dbfa5b3d3982beaab292159a /bitbake
parent5573852a826d2806c397a27896c4884bf094387d (diff)
downloadpoky-c373727bd0551651621cb83ee934f84e58aa9ee1.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py11
1 files changed, 10 insertions, 1 deletions
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):
1451 sq_taskname = [] 1451 sq_taskname = []
1452 sq_task = [] 1452 sq_task = []
1453 noexec = [] 1453 noexec = []
1454 stamppresent = []
1454 for task in xrange(len(self.sq_revdeps)): 1455 for task in xrange(len(self.sq_revdeps)):
1455 realtask = self.rqdata.runq_setscene[task] 1456 realtask = self.rqdata.runq_setscene[task]
1456 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]] 1457 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]]
1457 taskname = self.rqdata.runq_task[realtask] 1458 taskname = self.rqdata.runq_task[realtask]
1458 taskdep = self.rqdata.dataCache.task_deps[fn] 1459 taskdep = self.rqdata.dataCache.task_deps[fn]
1460
1459 if 'noexec' in taskdep and taskname in taskdep['noexec']: 1461 if 'noexec' in taskdep and taskname in taskdep['noexec']:
1460 noexec.append(task) 1462 noexec.append(task)
1461 self.task_skip(task) 1463 self.task_skip(task)
1462 bb.build.make_stamp(taskname + "_setscene", self.rqdata.dataCache, fn) 1464 bb.build.make_stamp(taskname + "_setscene", self.rqdata.dataCache, fn)
1463 continue 1465 continue
1466
1467 if self.rq.check_stamp_task(realtask, taskname + "_setscene"):
1468 logger.debug(2, 'Setscene stamp current for task %s(%s)', task, self.rqdata.get_user_idstring(realtask))
1469 stamppresent.append(task)
1470 self.task_skip(task)
1471 continue
1472
1464 sq_fn.append(fn) 1473 sq_fn.append(fn)
1465 sq_hashfn.append(self.rqdata.dataCache.hashfn[fn]) 1474 sq_hashfn.append(self.rqdata.dataCache.hashfn[fn])
1466 sq_hash.append(self.rqdata.runq_hash[realtask]) 1475 sq_hash.append(self.rqdata.runq_hash[realtask])
@@ -1470,7 +1479,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1470 locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.configuration.data } 1479 locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.configuration.data }
1471 valid = bb.utils.better_eval(call, locs) 1480 valid = bb.utils.better_eval(call, locs)
1472 1481
1473 valid_new = [] 1482 valid_new = stamppresent
1474 for v in valid: 1483 for v in valid:
1475 valid_new.append(sq_task[v]) 1484 valid_new.append(sq_task[v])
1476 1485