diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-23 16:26:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-24 10:35:33 +0100 |
commit | 897d7d171e3470a1299ad6294988408e30ea8cd3 (patch) | |
tree | 2ea93d02c8438023b181283534b2d88ab6f29b04 /bitbake | |
parent | 3049f6b8dfffcab6143995d51b9ee0129939a8e2 (diff) | |
download | poky-897d7d171e3470a1299ad6294988408e30ea8cd3.tar.gz |
bitbake: cooker.py: Ensure we track parser errors and only show bbappend issues on complete parse
Currently if any parsing failure occurs, there can be a long list of
bbappends that are "dangling" based on the fact that recipes were not
parsed. This change firstly ensures the error counter is incremented
and secondly that the bbappends list is only shown on a completed
parse list.
(Bitbake rev: 358952f0d874b869d361bbd72a5ea317bf939cd3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 361bc88a9d..5d01af31ac 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1205,8 +1205,9 @@ class BBCooker: | |||
1205 | 1205 | ||
1206 | if not self.parser.parse_next(): | 1206 | if not self.parser.parse_next(): |
1207 | collectlog.debug(1, "parsing complete") | 1207 | collectlog.debug(1, "parsing complete") |
1208 | self.show_appends_with_no_recipes() | 1208 | if not self.parser.error: |
1209 | self.buildDepgraph() | 1209 | self.show_appends_with_no_recipes() |
1210 | self.buildDepgraph() | ||
1210 | self.state = state.running | 1211 | self.state = state.running |
1211 | return None | 1212 | return None |
1212 | 1213 | ||
@@ -1601,6 +1602,7 @@ class CookerParser(object): | |||
1601 | self.skipped, self.masked, | 1602 | self.skipped, self.masked, |
1602 | self.virtuals, self.error, | 1603 | self.virtuals, self.error, |
1603 | self.total) | 1604 | self.total) |
1605 | |||
1604 | bb.event.fire(event, self.cfgdata) | 1606 | bb.event.fire(event, self.cfgdata) |
1605 | self.feeder_quit.put(None) | 1607 | self.feeder_quit.put(None) |
1606 | for process in self.processes: | 1608 | for process in self.processes: |
@@ -1658,20 +1660,25 @@ class CookerParser(object): | |||
1658 | self.shutdown() | 1660 | self.shutdown() |
1659 | return False | 1661 | return False |
1660 | except ParsingFailure as exc: | 1662 | except ParsingFailure as exc: |
1663 | self.error += 1 | ||
1661 | logger.error('Unable to parse %s: %s' % | 1664 | logger.error('Unable to parse %s: %s' % |
1662 | (exc.recipe, bb.exceptions.to_string(exc.realexception))) | 1665 | (exc.recipe, bb.exceptions.to_string(exc.realexception))) |
1663 | self.shutdown(clean=False) | 1666 | self.shutdown(clean=False) |
1664 | except bb.parse.ParseError as exc: | 1667 | except bb.parse.ParseError as exc: |
1668 | self.error += 1 | ||
1665 | logger.error(str(exc)) | 1669 | logger.error(str(exc)) |
1666 | self.shutdown(clean=False) | 1670 | self.shutdown(clean=False) |
1667 | except bb.data_smart.ExpansionError as exc: | 1671 | except bb.data_smart.ExpansionError as exc: |
1672 | self.error += 1 | ||
1668 | _, value, _ = sys.exc_info() | 1673 | _, value, _ = sys.exc_info() |
1669 | logger.error('ExpansionError during parsing %s: %s', value.recipe, str(exc)) | 1674 | logger.error('ExpansionError during parsing %s: %s', value.recipe, str(exc)) |
1670 | self.shutdown(clean=False) | 1675 | self.shutdown(clean=False) |
1671 | except SyntaxError as exc: | 1676 | except SyntaxError as exc: |
1677 | self.error += 1 | ||
1672 | logger.error('Unable to parse %s', exc.recipe) | 1678 | logger.error('Unable to parse %s', exc.recipe) |
1673 | self.shutdown(clean=False) | 1679 | self.shutdown(clean=False) |
1674 | except Exception as exc: | 1680 | except Exception as exc: |
1681 | self.error += 1 | ||
1675 | etype, value, tb = sys.exc_info() | 1682 | etype, value, tb = sys.exc_info() |
1676 | logger.error('Unable to parse %s', value.recipe, | 1683 | logger.error('Unable to parse %s', value.recipe, |
1677 | exc_info=(etype, value, exc.traceback)) | 1684 | exc_info=(etype, value, exc.traceback)) |