diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-25 18:40:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-26 14:55:21 +0100 |
commit | 46d8d04d51f19e6f7652e15844e5a557c6bcb1c9 (patch) | |
tree | 846a86ecd92342a9c0b28b2ff8a6f3b279c27f5b /bitbake | |
parent | 2b6114d5cc2f5ccac82d2530093c505686c0e4a8 (diff) | |
download | poky-46d8d04d51f19e6f7652e15844e5a557c6bcb1c9.tar.gz |
bitbake: runqueue.py: Fix a stamp comparision bug
We check the stamp cache before comparing t2 and t3 which means that we can miss
a level in the stamp file chains. The result of this is that a stamp can be accepted
as valid when in fact it isn't. Some weird behaviour alerted me to this in a local
build.
This patch also fixes to only uses the cache in recurse mode, there was a corner
case where stamps not in recurse mode could get added to the cache which could cause
an issue potentially.
(Bitbake rev: 7a5f776d325c0e37f58003424beda7cae2695325)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 0a8c723b15..306ae79330 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -835,9 +835,6 @@ class RunQueue: | |||
835 | t1 = get_timestamp(stampfile) | 835 | t1 = get_timestamp(stampfile) |
836 | for dep in self.rqdata.runq_depends[task]: | 836 | for dep in self.rqdata.runq_depends[task]: |
837 | if iscurrent: | 837 | if iscurrent: |
838 | if dep in cache: | ||
839 | iscurrent = cache[dep] | ||
840 | continue | ||
841 | fn2 = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[dep]] | 838 | fn2 = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[dep]] |
842 | taskname2 = self.rqdata.runq_task[dep] | 839 | taskname2 = self.rqdata.runq_task[dep] |
843 | stampfile2 = bb.build.stampfile(taskname2, self.rqdata.dataCache, fn2) | 840 | stampfile2 = bb.build.stampfile(taskname2, self.rqdata.dataCache, fn2) |
@@ -854,9 +851,15 @@ class RunQueue: | |||
854 | logger.debug(2, 'Stampfile %s < %s', stampfile, stampfile2) | 851 | logger.debug(2, 'Stampfile %s < %s', stampfile, stampfile2) |
855 | iscurrent = False | 852 | iscurrent = False |
856 | if recurse and iscurrent: | 853 | if recurse and iscurrent: |
857 | iscurrent = self.check_stamp_task(dep, recurse=True, cache=cache) | 854 | if dep in cache: |
858 | cache[dep] = iscurrent | 855 | iscurrent = cache[dep] |
859 | cache[task] = iscurrent | 856 | if not iscurrent: |
857 | logger.debug(2, 'Stampfile for dependency %s:%s invalid (cached)' % (fn2, taskname2)) | ||
858 | else: | ||
859 | iscurrent = self.check_stamp_task(dep, recurse=True, cache=cache) | ||
860 | cache[dep] = iscurrent | ||
861 | if recurse: | ||
862 | cache[task] = iscurrent | ||
860 | return iscurrent | 863 | return iscurrent |
861 | 864 | ||
862 | def execute_runqueue(self): | 865 | def execute_runqueue(self): |