aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2016-05-19 00:28:13 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-19 22:32:06 +0100
commitd416a4e16ea99c5ad7644160e3670da6653d786f (patch)
tree3043e7d6754a638782e3712187731cf388a21d62 /meta/lib
parentc60134f4c845a5722b2ed9d072ab48453881813f (diff)
downloadopenembedded-core-contrib-d416a4e16ea99c5ad7644160e3670da6653d786f.tar.gz
rootfs.py: Remove _log_check_error() from the RpmRootfs class
The fact that this function was overridden in the RpmRootfs class seems to have led to a number of misstakes when changes have been made to the base function in the Rootfs class. E.g., this change will properly solve ticket 7789, which was supposedly solved in 38871dc0, but that change had no effect in practice as the log_check_regex that was modified for RpmRootfs class was not used by the RpmRootfs version of _log_check_error()... The only thing _log_check_error() in RpmRootfs did that the base function in Rootfs did not do was to skip lines in the log that begin with a + sign. This has now been moved to the base function instead. [YOCTO #7789] (From OE-Core rev: 1eb0a46502fca4b2ee30ccd2508f4e21a40c25ca) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/rootfs.py29
1 files changed, 3 insertions, 26 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index f6fb06cc08..0a2753e6e8 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -62,6 +62,9 @@ class Rootfs(object):
for line in log:
if 'log_check' in line:
continue
+ # sh -x may emit code which isn't actually executed
+ if line.startswith('+'):
+ continue
if hasattr(self, 'log_check_expected_errors_regexes'):
m = None
@@ -473,32 +476,6 @@ class RpmRootfs(Rootfs):
# already saved in /etc/rpm-postinsts
pass
- def _log_check_error(self):
- r = re.compile('(unpacking of archive failed|Cannot find package|exit 1|ERR|Fail)')
- log_path = self.d.expand("${T}/log.do_rootfs")
- with open(log_path, 'r') as log:
- found_error = 0
- message = "\n"
- for line in log.read().split('\n'):
- if 'log_check' in line:
- continue
- # sh -x may emit code which isn't actually executed
- if line.startswith('+'):
- continue
-
- m = r.search(line)
- if m:
- found_error = 1
- bb.warn('log_check: There were error messages in the logfile')
- bb.warn('log_check: Matched keyword: [%s]\n\n' % m.group())
-
- if found_error >= 1 and found_error <= 5:
- message += line + '\n'
- found_error += 1
-
- if found_error == 6:
- bb.fatal(message)
-
def _log_check(self):
self._log_check_warn()
self._log_check_error()