Skip to contentSkip to conversation

rootfs.py: Improve rpm log_check_regex

PATCH New Ed Bartosh 1 participant 1 message May 20, 2015

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 rootfs.py: Improve rpm log_check_regex

Current regex can cause false negatives if paths in bitbake log files contain "ERR" or "Fail". do_rootfs fails with return code 1 in this case.

Improved regexp is based on error messages produced by rpm. Those are found by analyzing rpm source code.

[YOCTO #7789]

---
 meta/lib/oe/rootfs.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/lib/oe/rootfs.py +3 -1
index 6fb749f..ce23b23 100644
@@ -295,7 +295,9 @@ class Rootfs(object):
 class RpmRootfs(Rootfs):
     def __init__(self, d, manifest_dir):
         super(RpmRootfs, self).__init__(d)
-        self.log_check_regex = '(unpacking of archive failed|Cannot find package|exit 1|ERR|Fail)'
+        self.log_check_regex = '(unpacking of archive failed|Cannot find package'\
+                               '|exit 1|ERROR: |Error: |Error |ERROR '\
+                               '|Failed |Failed: |Failed$|Failed\(\d+\):)'
         self.manifest = RpmManifest(d, manifest_dir)
 
         self.pm = RpmPM(d,
Signature · 1 line
2.1.4