diff options
| author | Richard Purdie <richard@openedhand.com> | 2007-05-31 11:31:44 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2007-05-31 11:31:44 +0000 |
| commit | 1ad7c7b546a96a2fce84f188ac30200a6cdf66bf (patch) | |
| tree | 708097e31808575f6b18d15d6ed0609d9b313ffb /bitbake/lib/bb | |
| parent | 2a41ad55494430b9789e07bb976af3d9e6a704eb (diff) | |
| download | poky-1ad7c7b546a96a2fce84f188ac30200a6cdf66bf.tar.gz | |
bitbake: Exit if parsing errors occur
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1832 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 1868b268a3..77f71a7169 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -597,7 +597,7 @@ class BBCooker: | |||
| 597 | return (finalfiles, masked) | 597 | return (finalfiles, masked) |
| 598 | 598 | ||
| 599 | def parse_bbfiles(self, filelist, masked, progressCallback = None): | 599 | def parse_bbfiles(self, filelist, masked, progressCallback = None): |
| 600 | parsed, cached, skipped = 0, 0, 0 | 600 | parsed, cached, skipped, error = 0, 0, 0, 0 |
| 601 | for i in xrange( len( filelist ) ): | 601 | for i in xrange( len( filelist ) ): |
| 602 | f = filelist[i] | 602 | f = filelist[i] |
| 603 | 603 | ||
| @@ -640,6 +640,7 @@ class BBCooker: | |||
| 640 | self.bb_cache.sync() | 640 | self.bb_cache.sync() |
| 641 | raise | 641 | raise |
| 642 | except Exception, e: | 642 | except Exception, e: |
| 643 | error += 1 | ||
| 643 | self.bb_cache.remove(f) | 644 | self.bb_cache.remove(f) |
| 644 | bb.msg.error(bb.msg.domain.Collection, "%s while parsing %s" % (e, f)) | 645 | bb.msg.error(bb.msg.domain.Collection, "%s while parsing %s" % (e, f)) |
| 645 | except: | 646 | except: |
| @@ -651,3 +652,6 @@ class BBCooker: | |||
| 651 | bb.msg.note(1, bb.msg.domain.Collection, "Parsing finished. %d cached, %d parsed, %d skipped, %d masked." % ( cached, parsed, skipped, masked )) | 652 | bb.msg.note(1, bb.msg.domain.Collection, "Parsing finished. %d cached, %d parsed, %d skipped, %d masked." % ( cached, parsed, skipped, masked )) |
| 652 | 653 | ||
| 653 | self.bb_cache.sync() | 654 | self.bb_cache.sync() |
| 655 | |||
| 656 | if error > 0: | ||
| 657 | bb.msg.fatal(bb.msg.domain.Collection, "Parsing errors found, exiting...") | ||
