]> code.ossystems Code Review - openembedded-core.git/commitdiff
cooker: don't swallow recipe parse errors
authorChris Larson <chris_larson@mentor.com>
Thu, 16 Dec 2010 05:07:38 +0000 (22:07 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:51 +0000 (14:46 +0000)
(Bitbake rev: 1f5d49ce64e5e1c7705edbfa3c8e19649c21edd2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/cooker.py

index 8ac88b99a4e68afaa125507379e0f62eed156ddd..7a9b1d58d67fc88ca12b329760ec653bfff469d8 100644 (file)
@@ -965,7 +965,11 @@ class CookerExit(bb.event.Event):
 
 def parse_file(task):
     filename, appends = task
-    return True, bb.cache.Cache.parse(filename, appends, parse_file.cfg)
+    try:
+        return True, bb.cache.Cache.parse(filename, appends, parse_file.cfg)
+    except Exception, exc:
+        exc.recipe = filename
+        raise exc
 
 class CookerParser(object):
     def __init__(self, cooker, filelist, masked):
@@ -1049,7 +1053,7 @@ class CookerParser(object):
             raise
         except Exception as exc:
             self.shutdown(clean=False)
-            sys.exit(1)
+            bb.fatal('Error parsing %s: %s' % (exc.recipe, exc))
 
         self.current += 1
         self.virtuals += len(result)