summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/rootfs_rpm.bbclass23
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb23
2 files changed, 23 insertions, 23 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 9dc2bf997c..3442d48363 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -29,11 +29,6 @@ do_rootfs[vardepsexclude] += "BUILDNAME"
29RPM_PREPROCESS_COMMANDS = "package_update_index_rpm; " 29RPM_PREPROCESS_COMMANDS = "package_update_index_rpm; "
30RPM_POSTPROCESS_COMMANDS = "rpm_setup_smart_target_config; " 30RPM_POSTPROCESS_COMMANDS = "rpm_setup_smart_target_config; "
31 31
32#
33# Allow distributions to alter when [postponed] package install scripts are run
34#
35POSTINSTALL_INITPOSITION ?= "98"
36
37rpmlibdir = "/var/lib/rpm" 32rpmlibdir = "/var/lib/rpm"
38opkglibdir = "${localstatedir}/lib/opkg" 33opkglibdir = "${localstatedir}/lib/opkg"
39 34
@@ -114,24 +109,6 @@ fakeroot rootfs_rpm_do_rootfs () {
114 fi 109 fi
115 done 110 done
116 111
117 install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
118 # Stop $i getting expanded below...
119 i=\$i
120 cat > ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
121#!/bin/sh
122for i in \`ls /etc/rpm-postinsts/\`; do
123 i=/etc/rpm-postinsts/$i
124 echo "Running postinst $i..."
125 if [ -f $i ] && $i; then
126 rm $i
127 else
128 echo "ERROR: postinst $i failed."
129 fi
130done
131rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
132EOF
133 chmod 0755 ${IMAGE_ROOTFS}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
134
135 install -d ${IMAGE_ROOTFS}/${sysconfdir} 112 install -d ${IMAGE_ROOTFS}/${sysconfdir}
136 echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version 113 echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
137 114
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#
375POSTINSTALL_INITPOSITION ?= "98"
376
372do_install_append() { 377do_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
459for 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
467done
468rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
469EOF
470 chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
448} 471}
449 472
450do_install_append_class-native() { 473do_install_append_class-native() {