aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/bb/cooker.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index be1d55ae..70d1ae3e 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -948,15 +948,21 @@ class CookerParser(object):
def init(cfg):
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,