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:28:04 +0100 |
commit | 0bf2c0af71dd506e8019bdd5b2b3b826062185a3 (patch) | |
tree | 34ebd00d60c681f184594860a5d91a20179ef0ab /meta/recipes-devtools/opkg | |
parent | 45c37d629929c0ff9ff65a7fd940d06da36aa133 (diff) | |
download | poky-0bf2c0af71dd506e8019bdd5b2b3b826062185a3.tar.gz |
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]
(From OE-Core rev: 35be6ffc19a5156aa029397707f1e6869684b821)
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 | |||
68 | 68 | ||
69 | # this happens at S98 where our good 'ole packages script used to run | 69 | # this happens at S98 where our good 'ole packages script used to run |
70 | echo "#!/bin/sh | 70 | echo "#!/bin/sh |
71 | opkg-cl configure ${REDIRECT_CMD} | 71 | [ -e ${sysconfdir}/default/postinst ] && . ${sysconfdir}/default/postinst |
72 | if [ \"\$POSTINST_LOGGING\" = \"1\" ]; then | ||
73 | opkg-cl configure >\$LOGFILE 2>&1 | ||
74 | else | ||
75 | opkg-cl configure | ||
76 | fi | ||
72 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | 77 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts |
73 | " > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | 78 | " > $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts |
74 | chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | 79 | chmod 0755 $D${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts |