summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm_5.4.9.bb
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2013-02-25 11:06:51 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-07 11:14:39 +0000
commit9ed59a5d1897354e9d4a6d1179db50c1e04435a3 (patch)
tree007fae210bc170569d789f9f9157a06c875e2816 /meta/recipes-devtools/rpm/rpm_5.4.9.bb
parentf9cfc9f37a375c858dcd62c46617b4d2b3401ea2 (diff)
downloadpoky-9ed59a5d1897354e9d4a6d1179db50c1e04435a3.tar.gz
rpm: save output of postinstall scripts when image first boot
When image feature "debug-tweaks" is enabled, save output of post install script to log file which can be configured when image first boot. [YOCTO #3223] (From OE-Core rev: 94a58c153958002b117fcb5eeaef3d22be71a0f6) 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/rpm/rpm_5.4.9.bb')
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 0b014b61c5..cdfb5ff4bc 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -223,6 +223,7 @@ FILES_${PN} = "${bindir}/rpm \
223 ${libdir}/rpm/bin/wget \ 223 ${libdir}/rpm/bin/wget \
224 /var/lib/rpm \ 224 /var/lib/rpm \
225 /var/cache/rpm \ 225 /var/cache/rpm \
226 ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts \
226 " 227 "
227 228
228FILES_${PN}-dbg += "${libdir}/rpm/.debug \ 229FILES_${PN}-dbg += "${libdir}/rpm/.debug \
@@ -374,6 +375,9 @@ do_configure() {
374# 375#
375POSTINSTALL_INITPOSITION ?= "98" 376POSTINSTALL_INITPOSITION ?= "98"
376 377
378POSTLOG ?= "/var/log/postinstall.log"
379REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>>${POSTLOG} 2>&1', '', d)}"
380
377do_install_append() { 381do_install_append() {
378 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros 382 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
379 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros 383 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
@@ -459,7 +463,7 @@ do_install_append() {
459for i in \`ls /etc/rpm-postinsts/\`; do 463for i in \`ls /etc/rpm-postinsts/\`; do
460 i=/etc/rpm-postinsts/$i 464 i=/etc/rpm-postinsts/$i
461 echo "Running postinst $i..." 465 echo "Running postinst $i..."
462 if [ -f $i ] && $i; then 466 if [ -f $i ] && $i ${REDIRECT_CMD}; then
463 rm $i 467 rm $i
464 else 468 else
465 echo "ERROR: postinst $i failed." 469 echo "ERROR: postinst $i failed."