diff options
author | Kang Kai <kai.kang@windriver.com> | 2013-02-25 10:57:24 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-01 13:03:26 +0000 |
commit | c2fefcdc185e8e43ac4aa8c31d03ae70f113eeee (patch) | |
tree | 6857a850ef0b590744948efe377aa9040879e69d /meta/recipes-devtools | |
parent | 0ca565d70c9803b7386996c9fb0c843078ad62f6 (diff) | |
download | poky-c2fefcdc185e8e43ac4aa8c31d03ae70f113eeee.tar.gz |
rootfs_rpm: move run-postinsts scripts to rpm recipe
Move run-postinsts scripts from rootfs_rpm.bbclass to rpm recipe. That
is the same way for dpkg and opkg to deal the post install scripts.
(From OE-Core rev: 04607b0cd496837f10ef78cf43597ec1d2e13f2e)
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')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.4.9.bb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb index 39b0481e6f..0b014b61c5 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb | |||
@@ -369,6 +369,11 @@ do_configure() { | |||
369 | oe_runconf | 369 | oe_runconf |
370 | } | 370 | } |
371 | 371 | ||
372 | # | ||
373 | # Allow distributions to alter when [postponed] package install scripts are run | ||
374 | # | ||
375 | POSTINSTALL_INITPOSITION ?= "98" | ||
376 | |||
372 | do_install_append() { | 377 | do_install_append() { |
373 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros | 378 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros |
374 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros | 379 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros |
@@ -445,6 +450,24 @@ do_install_append() { | |||
445 | 450 | ||
446 | rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj | 451 | rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj |
447 | rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl | 452 | rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl |
453 | |||
454 | install -d ${D}/${sysconfdir}/rcS.d | ||
455 | # Stop $i getting expanded below... | ||
456 | i=\$i | ||
457 | cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF | ||
458 | #!/bin/sh | ||
459 | for i in \`ls /etc/rpm-postinsts/\`; do | ||
460 | i=/etc/rpm-postinsts/$i | ||
461 | echo "Running postinst $i..." | ||
462 | if [ -f $i ] && $i; then | ||
463 | rm $i | ||
464 | else | ||
465 | echo "ERROR: postinst $i failed." | ||
466 | fi | ||
467 | done | ||
468 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | ||
469 | EOF | ||
470 | chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | ||
448 | } | 471 | } |
449 | 472 | ||
450 | do_install_append_class-native() { | 473 | do_install_append_class-native() { |