]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/rootfs: introduce IMAGE_LOG_CHECK_EXCLUDES
authorKonrad Weihmann <kweihmann@outlook.com>
Fri, 16 Oct 2020 19:46:23 +0000 (21:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 20 Oct 2020 10:11:41 +0000 (11:11 +0100)
When using rpm as package manager and trying to install a file called
'/usr/share/doc/What to when an Error occurs.txt'
log_check falsely errors out on the build, because used regex match on
'DEBUG:  Removing manifest: /path/usr/share/doc/What
to when an Error occurs.txt'.
To handle such cases introduce IMAGE_LOG_CHECK_EXCLUDES, to allow
user to add custom exclude regex to log_check exclude list

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/rootfs.py

index 3813f68e8b58a5e313c84a4e9f2feb0ceaedf172..4e09eae6b91f9ccb0c26fa58ce376adcb7ed6265 100644 (file)
@@ -55,6 +55,8 @@ class Rootfs(object, metaclass=ABCMeta):
         excludes = [ 'log_check', r'^\+' ]
         if hasattr(self, 'log_check_expected_regexes'):
             excludes.extend(self.log_check_expected_regexes)
+        # Insert custom log_check excludes
+        excludes += [x for x in (self.d.getVar("IMAGE_LOG_CHECK_EXCLUDES") or "").split(" ") if x]
         excludes = [re.compile(x) for x in excludes]
         r = re.compile(match)
         log_path = self.d.expand("${T}/log.do_rootfs")