From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by mail.openembedded.org (Postfix) with ESMTP id 199B06A38A for ; Tue, 21 May 2013 08:12:07 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.14.5/8.14.3) with ESMTP id r4L8C9se016285 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 21 May 2013 01:12:09 -0700 (PDT) Received: from pek-qchen1-d1.corp.ad.wrs.com (128.224.162.233) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.2.342.3; Tue, 21 May 2013 01:12:08 -0700 From: To: Date: Tue, 21 May 2013 16:12:10 +0800 Message-ID: <1c8ed5495a784a97c1dca1261ddff80ca6cff8b9.1369123754.git.Qi.Chen@windriver.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Cc: qingtao.cao@windriver.com Subject: [PATCH V3 3/4] opkg: modify the run-postinst script to enable postinst logging X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 May 2013 08:12:07 -0000 Content-Type: text/plain From: Chen Qi 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 --- 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