aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-02-16 17:50:50 -0500
committerChris Larson <chris_larson@mentor.com>2011-02-16 17:50:51 -0500
commite9e174e5781fc3de4dfd60d01228048a06a62b16 (patch)
treec92e465d36c05938d1488a29b2fe36f45c5572c0
parent8eafb12208fcd073f930c0c74f25831d02c02198 (diff)
downloadbitbake-e9e174e5781fc3de4dfd60d01228048a06a62b16.tar.gz
bitbake-e9e174e5781fc3de4dfd60d01228048a06a62b16.tar.bz2
bitbake-e9e174e5781fc3de4dfd60d01228048a06a62b16.zip
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. Signed-off-by: Chris Larson <chris_larson@mentor.com>
-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,