]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: Exit if parsing errors occur
authorRichard Purdie <richard@openedhand.com>
Thu, 31 May 2007 11:31:44 +0000 (11:31 +0000)
committerRichard Purdie <richard@openedhand.com>
Thu, 31 May 2007 11:31:44 +0000 (11:31 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1832 311d38ba-8fff-0310-9ca6-ca027cbcb966

bitbake/lib/bb/cooker.py

index 1868b268a394fbad73f3ae9cb016565aba41ce36..77f71a71693f8e5d3e9b2abef94a4afee4b0dd34 100644 (file)
@@ -597,7 +597,7 @@ class BBCooker:
         return (finalfiles, masked)
 
     def parse_bbfiles(self, filelist, masked, progressCallback = None):
-        parsed, cached, skipped = 0, 0, 0
+        parsed, cached, skipped, error = 0, 0, 0, 0
         for i in xrange( len( filelist ) ):
             f = filelist[i]
 
@@ -640,6 +640,7 @@ class BBCooker:
                 self.bb_cache.sync()
                 raise
             except Exception, e:
+                error += 1
                 self.bb_cache.remove(f)
                 bb.msg.error(bb.msg.domain.Collection, "%s while parsing %s" % (e, f))
             except:
@@ -651,3 +652,6 @@ class BBCooker:
             bb.msg.note(1, bb.msg.domain.Collection, "Parsing finished. %d cached, %d parsed, %d skipped, %d masked." % ( cached, parsed, skipped, masked ))
 
         self.bb_cache.sync()
+
+        if error > 0:
+            bb.msg.fatal(bb.msg.domain.Collection, "Parsing errors found, exiting...")