diff options
author | Kang Kai <kai.kang@windriver.com> | 2013-02-25 10:45:13 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-07 11:14:38 +0000 |
commit | f9cfc9f37a375c858dcd62c46617b4d2b3401ea2 (patch) | |
tree | 8b110e739b197eff057e66a5ba7fefedbf1b32e8 /meta/recipes-devtools/dpkg | |
parent | 0276db5e64e2a233c673e55c3ac1fdefe3030f39 (diff) | |
download | poky-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/recipes-devtools/dpkg')
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg.inc | 8 |
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." | |||
2 | LICENSE = "GPLv2.0+" | 2 | LICENSE = "GPLv2.0+" |
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | 4 | ||
5 | INC_PR = "r18" | 5 | INC_PR = "r19" |
6 | 6 | ||
7 | SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \ | 7 | SRC_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 | ||
38 | POSTLOG ?= "/var/log/postinstall.log" | ||
39 | REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}" | ||
38 | 40 | ||
39 | DPKG_INIT_POSITION ?= "98" | 41 | DPKG_INIT_POSITION ?= "98" |
40 | do_install_prepend () { | 42 | do_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 |
44 | dpkg --configure -a | 46 | dpkg --configure -a ${REDIRECT_CMD} |
45 | rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts | 47 | rm -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 |