diff options
| -rw-r--r-- | meta/lib/oe/rootfs.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 63ca22f311..741399adc2 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
| @@ -41,11 +41,22 @@ class Rootfs(object): | |||
| 41 | pass | 41 | pass |
| 42 | 42 | ||
| 43 | def _log_check_warn(self): | 43 | def _log_check_warn(self): |
| 44 | # Ignore any lines containing log_check to avoid recursion, and ignore | ||
| 45 | # lines beginning with a + since sh -x may emit code which isn't | ||
| 46 | # actually executed, but may contain error messages | ||
| 47 | excludes = [ 'log_check', r'^\+' ] | ||
| 48 | if hasattr(self, 'log_check_expected_regexes'): | ||
| 49 | excludes.extend(self.log_check_expected_regexes) | ||
| 50 | excludes = [re.compile(x) for x in excludes] | ||
| 44 | r = re.compile('^(warn|Warn|WARNING:)') | 51 | r = re.compile('^(warn|Warn|WARNING:)') |
| 45 | log_path = self.d.expand("${T}/log.do_rootfs") | 52 | log_path = self.d.expand("${T}/log.do_rootfs") |
| 46 | with open(log_path, 'r') as log: | 53 | with open(log_path, 'r') as log: |
| 47 | for line in log: | 54 | for line in log: |
| 48 | if 'log_check' in line: | 55 | for ee in excludes: |
| 56 | m = ee.search(line) | ||
| 57 | if m: | ||
| 58 | break | ||
| 59 | if m: | ||
| 49 | continue | 60 | continue |
| 50 | 61 | ||
| 51 | m = r.search(line) | 62 | m = r.search(line) |
| @@ -58,8 +69,8 @@ class Rootfs(object): | |||
| 58 | # lines beginning with a + since sh -x may emit code which isn't | 69 | # lines beginning with a + since sh -x may emit code which isn't |
| 59 | # actually executed, but may contain error messages | 70 | # actually executed, but may contain error messages |
| 60 | excludes = [ 'log_check', r'^\+' ] | 71 | excludes = [ 'log_check', r'^\+' ] |
| 61 | if hasattr(self, 'log_check_expected_errors_regexes'): | 72 | if hasattr(self, 'log_check_expected_regexes'): |
| 62 | excludes.extend(self.log_check_expected_errors_regexes) | 73 | excludes.extend(self.log_check_expected_regexes) |
| 63 | excludes = [re.compile(x) for x in excludes] | 74 | excludes = [re.compile(x) for x in excludes] |
| 64 | r = re.compile(self.log_check_regex) | 75 | r = re.compile(self.log_check_regex) |
| 65 | log_path = self.d.expand("${T}/log.do_rootfs") | 76 | log_path = self.d.expand("${T}/log.do_rootfs") |
| @@ -597,7 +608,7 @@ class DpkgRootfs(DpkgOpkgRootfs): | |||
| 597 | def __init__(self, d, manifest_dir): | 608 | def __init__(self, d, manifest_dir): |
| 598 | super(DpkgRootfs, self).__init__(d) | 609 | super(DpkgRootfs, self).__init__(d) |
| 599 | self.log_check_regex = '^E:' | 610 | self.log_check_regex = '^E:' |
| 600 | self.log_check_expected_errors_regexes = \ | 611 | self.log_check_expected_regexes = \ |
| 601 | [ | 612 | [ |
| 602 | "^E: Unmet dependencies." | 613 | "^E: Unmet dependencies." |
| 603 | ] | 614 | ] |
