summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2013-02-25 10:45:13 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-07 11:14:38 +0000
commitf9cfc9f37a375c858dcd62c46617b4d2b3401ea2 (patch)
tree8b110e739b197eff057e66a5ba7fefedbf1b32e8 /meta
parent0276db5e64e2a233c673e55c3ac1fdefe3030f39 (diff)
downloadpoky-f9cfc9f37a375c858dcd62c46617b4d2b3401ea2.tar.gz
dpkg: save output of postinstall scripts when image firstboot
When image feature "debug-tweaks" enabled, save output of postinstall scripts to log file /var/log/postinstall.log when image first boot. And the log file can be configured. It also needs image feature "package-management" enabled. If not, package run-postinsts will be installed and then all packages will be configured by it. Command 'dpkg --configure' outputs nothing. [YOCTO #3223] (From OE-Core rev: 684b94317f5b78f6c9c993f84438f8fa7e59fd5a) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index fd26c8a247..0bc1ae8c5a 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Package maintenance system for Debian."
2LICENSE = "GPLv2.0+" 2LICENSE = "GPLv2.0+"
3SECTION = "base" 3SECTION = "base"
4 4
5INC_PR = "r18" 5INC_PR = "r19"
6 6
7SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \ 7SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \
8 file://ignore_extra_fields.patch" 8 file://ignore_extra_fields.patch"
@@ -35,13 +35,15 @@ do_configure () {
35 autotools_do_configure 35 autotools_do_configure
36} 36}
37 37
38POSTLOG ?= "/var/log/postinstall.log"
39REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}"
38 40
39DPKG_INIT_POSITION ?= "98" 41DPKG_INIT_POSITION ?= "98"
40do_install_prepend () { 42do_install_prepend () {
41 install -d ${D}/${sysconfdir}/rcS.d 43 install -d ${D}/${sysconfdir}/rcS.d
42 # this happens at S98 where our good 'ole packages script used to run 44 # this happens at S98 where our good 'ole packages script used to run
43 printf "#!/bin/sh 45 echo "#!/bin/sh
44dpkg --configure -a 46dpkg --configure -a ${REDIRECT_CMD}
45rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts 47rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
46" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts 48" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
47 chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts 49 chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts