From ab84c98f9f82d84fb7a60774e08d41013c8de8a9 Mon Sep 17 00:00:00 2001 From: Peter Seebach Date: Thu, 21 May 2015 15:36:35 -0500 Subject: rootfs.py: Make set -x not break rootfs creation The rootfs logfile check errors out if it finds an "exit 1" in a log. But consider the shell idiom: if ! $command; then exit 1; fi and consider a postinstall script with a "set -x" for debugging purposes (to get log output in /var/log/postinstall.log.) Solution: Ignore lines prefixed with a +, because those show shell code even if a specific fragment won't be executed. (From OE-Core rev: f23f129dba66144abf8fe8450320e01fa4c02f5c) (From OE-Core rev: a13185ba4a29fca319b4eb4a76fdbdfcfe767322) Signed-off-by: Peter Seebach Signed-off-by: Richard Purdie --- meta/lib/oe/rootfs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index ce23b237dc..a9a6c85a2c 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -403,6 +403,9 @@ class RpmRootfs(Rootfs): 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: -- cgit v1.2.3-54-g00ecf