]> code.ossystems Code Review - openembedded-core.git/commitdiff
cache: use max() to determine newest_mtime
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 4 Jun 2010 12:04:39 +0000 (14:04 +0200)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 2 Jul 2010 14:41:35 +0000 (15:41 +0100)
(Bitbake rev: c0cf85beda4cf8748fd270c037442cde7b98146b)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/cache.py

index 33734df9404c8fcba831a09f61075ed602d7125c..8c1e6922fb632e47fee617910b1c9c7ef624c2cc 100644 (file)
@@ -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: