[OE-core] [PATCH 2/4] dpkg: modify the run-postinst script to enable postinst logging
Qi.Chen at windriver.com
Qi.Chen at windriver.com
Thu May 16 07:56:15 UTC 2013
From: Chen Qi <Qi.Chen at windriver.com>
Enable postinst logging according to the existence of the file
/etc/.enable_postinst_logging.
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/dpkg/dpkg.inc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index d773fbd..c013d03 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -35,10 +35,6 @@ do_configure () {
autotools_do_configure
}
-POSTLOG ?= "/var/log/postinstall.log"
-REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}"
-REDIRECT_CMD[vardepsexclude] += "IMAGE_FEATURES POSTLOG"
-
DPKG_INIT_POSITION ?= "98"
do_install_append () {
@@ -67,7 +63,11 @@ if [ "x$D" != "x" ] && [ -f $D/var/lib/dpkg/status ]; then
# this happens at S98 where our good 'ole packages script used to run
echo "#!/bin/sh
-dpkg --configure -a ${REDIRECT_CMD}
+if [ -e /etc/.enable_postinst_logging ]; then
+ dpkg --configure -a >/var/log/postinstall.log 2>&1
+else
+ dpkg --configure -a
+fi
rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
" > $D${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
chmod 0755 $D${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
--
1.7.9.5
More information about the Openembedded-core
mailing list