]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: don't choke if we have nothing to parse
authorChris Larson <chris_larson@mentor.com>
Wed, 16 Feb 2011 22:50:50 +0000 (17:50 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jun 2011 19:38:26 +0000 (20:38 +0100)
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>
bitbake/lib/bb/cooker.py

index ece88fce93154d062c8155ed59b088684aeda843..4f930ee84025635cf37d282100aafa65de9ed82c 100644 (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,