[OE-core] [PATCH 1/1] rootfs.py: Make set -x not break rootfs creation
Peter Seebach
peter.seebach at windriver.com
Thu May 21 20:36:35 UTC 2015
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.
Signed-off-by: Peter Seebach <peter.seebach at windriver.com>
---
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 6fb749f..5d27d2f 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -401,6 +401,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:
--
2.3.1
More information about the Openembedded-core
mailing list