1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

cooker: don't choke if we have nothing to parse

If all our recipes were cached, there's no reason to fire off any parsing
progress events at all.

(Bitbake rev: e9e174e5781fc3de4dfd60d01228048a06a62b16)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chris Larson
2011-02-16 17:50:50 -05:00
committed by Richard Purdie
parent 0f74a38ffd
commit 87dfc1466d
+11 -5
View File
@@ -1185,15 +1185,21 @@ class CookerParser(object):
multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, args=(self.cooker.configuration.data, ), exitpriority=1)
parse_file.cfg = cfg
bb.event.fire(bb.event.ParseStarted(self.toparse), self.cfgdata)
self.results = self.load_cached()
self.pool = multiprocessing.Pool(self.num_processes, init, [self.cfgdata])
parsed = self.pool.imap(parse_file, self.willparse)
self.pool.close()
if self.toparse:
bb.event.fire(bb.event.ParseStarted(self.toparse), self.cfgdata)
self.results = itertools.chain(self.load_cached(), parsed)
self.pool = multiprocessing.Pool(self.num_processes, init, [self.cfgdata])
parsed = self.pool.imap(parse_file, self.willparse)
self.pool.close()
self.results = itertools.chain(self.results, parsed)
def shutdown(self, clean=True):
if not self.toparse:
return
if clean:
event = bb.event.ParseCompleted(self.cached, self.parsed,
self.skipped, self.masked,