summaryrefslogtreecommitdiffstats
path: root/bitbake
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
parent0f74a38ffdaa409fa1dfbfa2a54dbac9df9aba31 (diff)
downloadpoky-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')
-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 ece88fce93..4f930ee840 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1185,15 +1185,21 @@ class CookerParser(object):
1185 multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, args=(self.cooker.configuration.data, ), exitpriority=1) 1185 multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, args=(self.cooker.configuration.data, ), exitpriority=1)
1186 parse_file.cfg = cfg 1186 parse_file.cfg = cfg
1187 1187
1188 bb.event.fire(bb.event.ParseStarted(self.toparse), self.cfgdata) 1188 self.results = self.load_cached()
1189 1189
1190 self.pool = multiprocessing.Pool(self.num_processes, init, [self.cfgdata]) 1190 if self.toparse:
1191 parsed = self.pool.imap(parse_file, self.willparse) 1191 bb.event.fire(bb.event.ParseStarted(self.toparse), self.cfgdata)
1192 self.pool.close()
1193 1192
1194 self.results = itertools.chain(self.load_cached(), parsed) 1193 self.pool = multiprocessing.Pool(self.num_processes, init, [self.cfgdata])
1194 parsed = self.pool.imap(parse_file, self.willparse)
1195 self.pool.close()
1196
1197 self.results = itertools.chain(self.results, parsed)
1195 1198
1196 def shutdown(self, clean=True): 1199 def shutdown(self, clean=True):
1200 if not self.toparse:
1201 return
1202
1197 if clean: 1203 if clean:
1198 event = bb.event.ParseCompleted(self.cached, self.parsed, 1204 event = bb.event.ParseCompleted(self.cached, self.parsed,
1199 self.skipped, self.masked, 1205 self.skipped, self.masked,