[OE-core] [PATCH 2/2] base-passwd: Make the postinst function verbose if BB_VERBOSE_LOGS is set

Peter Kjellerstedt peter.kjellerstedt at axis.com
Fri Apr 14 02:39:54 UTC 2017


If BB_VERBOSE_LOGS is enabled, then make the postinst function use
set -x so that its execution is traced. This greatly simplifies
debugging, especially in case of failures as nothing is recorded in
the logs otherwise to indicate what caused the failure.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
---
 meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index c6be1c1d08..0d5deee7d0 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -46,6 +46,8 @@ do_install () {
 basepasswd_sysroot_postinst() {
 #!/bin/sh
 
+${@"set -x" if bb.msg.loggerVerboseLogs else ""}
+
 # Install passwd.master and group.master to sysconfdir
 install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
 for i in passwd group; do
-- 
2.12.0




More information about the Openembedded-core mailing list