summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-16 10:46:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-16 10:51:17 +0000
commit4ca7075b0972163d95e3c3f5a40c602bf3bb0245 (patch)
treefb43857313251a7d1829393092c5e07de260abc9 /bitbake/lib/bb
parent1d52c11bf34855bce450bcb2f8651fdaf2d90196 (diff)
downloadpoky-4ca7075b0972163d95e3c3f5a40c602bf3bb0245.tar.gz
runqueue.py: When checking whether stamps are valid for setscene, recurse
Currently the code checking whether stamps are valid only traverses one step of the dependency graph. This works fine in the normal cases where we've already validated dependencies but for the setscene code, it doesn't work well. A typical problem usecase is something like: bitbake gcc-cross -c unpack -f bitbake gcc-cross which will ignore any sstate files already cached which could be used to speed up the gcc-cross build. This becomes particularly problematic with multiple gcc builds where only one should rebuild yet they all do. This patch teaches the stamp code to be able to recurse within a given fn which gives the behaviour people would expect from the code and allows bitbake to make better use of prebuild sstate objects. (Bitbake rev: e68814cb2e8da523d4ddf05e8ceddfaa19244851) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/runqueue.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index bc0602700d..dcd6d1a8c0 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -875,7 +875,7 @@ class RunQueue:
875 bb.msg.fatal("RunQueue", "check_stamps fatal internal error") 875 bb.msg.fatal("RunQueue", "check_stamps fatal internal error")
876 return current 876 return current
877 877
878 def check_stamp_task(self, task, taskname = None): 878 def check_stamp_task(self, task, taskname = None, recurse = False):
879 def get_timestamp(f): 879 def get_timestamp(f):
880 try: 880 try:
881 if not os.access(f, os.F_OK): 881 if not os.access(f, os.F_OK):
@@ -930,7 +930,8 @@ class RunQueue:
930 if t1 < t2: 930 if t1 < t2:
931 logger.debug(2, 'Stampfile %s < %s', stampfile, stampfile2) 931 logger.debug(2, 'Stampfile %s < %s', stampfile, stampfile2)
932 iscurrent = False 932 iscurrent = False
933 933 if recurse and iscurrent:
934 iscurrent = self.check_stamp_task(dep, recurse=True)
934 return iscurrent 935 return iscurrent
935 936
936 def execute_runqueue(self): 937 def execute_runqueue(self):
@@ -1648,7 +1649,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1648 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]] 1649 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]]
1649 1650
1650 taskname = self.rqdata.runq_task[realtask] + "_setscene" 1651 taskname = self.rqdata.runq_task[realtask] + "_setscene"
1651 if self.rq.check_stamp_task(realtask, self.rqdata.runq_task[realtask]): 1652 if self.rq.check_stamp_task(realtask, self.rqdata.runq_task[realtask], recurse = True):
1652 logger.debug(2, 'Stamp for underlying task %s(%s) is current, so skipping setscene variant', 1653 logger.debug(2, 'Stamp for underlying task %s(%s) is current, so skipping setscene variant',
1653 task, self.rqdata.get_user_idstring(realtask)) 1654 task, self.rqdata.get_user_idstring(realtask))
1654 self.task_failoutright(task) 1655 self.task_failoutright(task)