From cf79cf127b370160b59e088acec187b0f0212e7f Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 4 Jun 2010 14:04:39 +0200 Subject: cache: use max() to determine newest_mtime (Bitbake rev: c0cf85beda4cf8748fd270c037442cde7b98146b) Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/cache.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 33734df94..8c1e6922f 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -70,9 +70,10 @@ class Cache: # cache there isn't even any point in loading it... newest_mtime = 0 deps = bb.data.getVar("__depends", data) - for f, old_mtime in deps: - if old_mtime > newest_mtime: - newest_mtime = old_mtime + + old_mtimes = [old_mtime for f, old_mtime in deps] + old_mtimes.append(newest_mtime) + newest_mtime = max(old_mtimes) if bb.parse.cached_mtime_noerror(self.cachefile) >= newest_mtime: try: -- cgit v1.2.3