summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-02-16 17:50:50 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-08 20:38:26 +0100
commit87dfc1466d91e9d80b122691b965714fd10ab209 (patch)
tree8446c495d40a75d6f05038af9b91c1c307794a68 /bitbake/lib
parent0f74a38ffdaa409fa1dfbfa2a54dbac9df9aba31 (diff)
downloadast2050-yocto-poky-87dfc1466d91e9d80b122691b965714fd10ab209.zip
ast2050-yocto-poky-87dfc1466d91e9d80b122691b965714fd10ab209.tar.gz
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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index ece88fc..4f930ee 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -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,
OpenPOWER on IntegriCloud