]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
runqueue: Only attempt to print closest matching task if there is a match
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 20 Jan 2014 21:36:36 +0000 (21:36 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 21 Jan 2014 15:13:38 +0000 (15:13 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/runqueue.py

index 457723603a52b94a8931df8aadf1085c2699520f..bf2dc5494d2e4df3f6c9ca965737830e0adbbb2d 100644 (file)
@@ -1224,12 +1224,11 @@ class RunQueue:
             if match is None:
                 bb.fatal("Can't find a task we're supposed to have written out? (hash: %s)?" % h)
             matches = {k : v for k, v in matches.iteritems() if h not in k}
-            latestmatch = sorted(matches.keys(), key=lambda f: matches[f])[-1]
-            prevh = __find_md5__.search(latestmatch).group(0)
-            output = bb.siggen.compare_sigfiles(latestmatch, match, recursecb)
-            bb.plain("\nTask %s:%s couldn't be used from the cache because:\n  We need hash %s, closest matching task was %s\n  " % (pn, taskname, h, prevh) + '\n  '.join(output))
-             
-
+            if len(matches):
+                latestmatch = sorted(matches.keys(), key=lambda f: matches[f])[-1]
+                prevh = __find_md5__.search(latestmatch).group(0)
+                output = bb.siggen.compare_sigfiles(latestmatch, match, recursecb)
+                bb.plain("\nTask %s:%s couldn't be used from the cache because:\n  We need hash %s, closest matching task was %s\n  " % (pn, taskname, h, prevh) + '\n  '.join(output))
 
 class RunQueueExecute: