[OE-core] [PATCH V3 3/4] opkg: modify the run-postinst script to enable postinst logging
Qi.Chen at windriver.com
Qi.Chen at windriver.com
Tue May 21 08:12:10 UTC 2013
From: Chen Qi <Qi.Chen at windriver.com>
Enable postinst logging by checking the configuration in /etc/
default/postinst.
In this way, the postinst logging is enabled if 'debug-tweaks' is
in IMAGE_FEATURES, and at the same time, we avoid unnecessary rebuilt
if IMAGE_FEATURES is changed.
[YOCTO #4262]
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
---
meta/recipes-devtools/opkg/opkg.inc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index 631aafc..2de75e1 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -68,7 +68,12 @@ if [ "x$D" != "x" ] && [ -f $D${OPKGLIBDIR}/opkg/status ]; then
# this happens at S98 where our good 'ole packages script used to run
echo "#!/bin/sh
-opkg-cl configure ${REDIRECT_CMD}
+[ -e /etc/default/postinst ] && . /etc/default/postinst
+if [ \"\$POSTINST_LOGGING\" = \"1\" ]; then
+ opkg-cl configure >\$LOGFILE 2>&1
+else
+ opkg-cl configure
+fi
rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
" > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
--
1.7.9.5
More information about the Openembedded-core
mailing list