diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2013-05-23 12:43:35 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-23 10:27:53 +0100 |
commit | 35be6ffc19a5156aa029397707f1e6869684b821 (patch) | |
tree | 62ef5cd1a95a004f233112e6b9b8f13c08d8ffa6 /meta/recipes-devtools/opkg | |
parent | 881880992ac0edc5f928f7e3d2a8f3f993284df6 (diff) | |
download | openembedded-core-35be6ffc19a5156aa029397707f1e6869684b821.tar.gz openembedded-core-35be6ffc19a5156aa029397707f1e6869684b821.tar.bz2 openembedded-core-35be6ffc19a5156aa029397707f1e6869684b821.zip |
opkg: modify the run-postinst script to enable postinst logging
Enable postinst logging by checking the configuration in ${sysconfdir}
/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@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/opkg')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc index 631aafc768..3b8c4e8e40 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 ${sysconfdir}/default/postinst ] && . ${sysconfdir}/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 |