summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2013-04-03 15:38:46 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-04 14:04:42 +0100
commitb450344ca7eaf8f7868d85052aca31d07b03aac8 (patch)
tree18809dd13cf59ae2acb8a0e49ce26e2ae54d8ba7 /meta/recipes-devtools
parent4d309730013434e1ce493ee80f9534336509dca4 (diff)
downloadpoky-b450344ca7eaf8f7868d85052aca31d07b03aac8.tar.gz
rpm-postinsts: Split out run-postinsts
This patch allows for the run-postinsts script to be provided outside of the rpm package itself and not pull in all the associated build dependencies. [YOCTO 4175] (From OE-Core rev: 7841ee7041d04f11a3d879fb5bc60bb37de0a5c0) 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-postinsts.bb50
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb30
2 files changed, 51 insertions, 29 deletions
diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb b/meta/recipes-devtools/rpm/rpm-postinsts.bb
new file mode 100644
index 0000000000..27ef2aa384
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm-postinsts.bb
@@ -0,0 +1,50 @@
1DESCRIPTION = "RPM postinstall script"
2SECTION = "core"
3LICENSE = "LGPLv2.1"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780"
5
6RDEPENDS_${PN} = "base-files"
7
8inherit update-rc.d allarch
9#
10# Allow distributions to alter when [postponed] package install scripts are run
11#
12POSTINSTALL_INITPOSITION ?= "98"
13
14INITSCRIPT_NAME = "run-postinsts"
15INITSCRIPT_PARAMS = "start ${{POSTINSTALL_INITPOSITION} S ."
16
17POSTLOG ?= "/var/log/postinstall.log"
18REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>>${POSTLOG} 2>&1', '', d)}"
19
20do_fetch() {
21 :
22}
23
24do_configure() {
25 :
26}
27
28do_compile() {
29 :
30}
31
32do_install() {
33 install -d ${D}/${sysconfdir}/rcS.d
34 # Stop $i getting expanded below...
35 i=\$i
36 cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
37#!/bin/sh
38for i in \`ls /etc/rpm-postinsts/\`; do
39 i=/etc/rpm-postinsts/$i
40 echo "Running postinst $i..."
41 if [ -f $i ] && $i ${REDIRECT_CMD}; then
42 rm $i
43 else
44 echo "ERROR: postinst $i failed."
45 fi
46done
47rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
48EOF
49 chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
50}
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 7c3897c822..c7d21e87bf 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -200,7 +200,7 @@ CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
200 200
201LDFLAGS_append_libc-uclibc = "-lrt -lpthread" 201LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
202 202
203PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale ${PN}-postinsts" 203PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale"
204 204
205SOLIBS = "5.4.so" 205SOLIBS = "5.4.so"
206 206
@@ -228,9 +228,6 @@ FILES_${PN} = "${bindir}/rpm \
228 228
229RDEPENDS_${PN} += "${PN}-postinsts" 229RDEPENDS_${PN} += "${PN}-postinsts"
230 230
231FILES_${PN}-postinsts = "${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts \
232 "
233
234FILES_${PN}-dbg += "${libdir}/rpm/.debug \ 231FILES_${PN}-dbg += "${libdir}/rpm/.debug \
235 ${libdir}/rpm/bin/.debug \ 232 ${libdir}/rpm/bin/.debug \
236 " 233 "
@@ -375,14 +372,6 @@ do_configure() {
375 oe_runconf 372 oe_runconf
376} 373}
377 374
378#
379# Allow distributions to alter when [postponed] package install scripts are run
380#
381POSTINSTALL_INITPOSITION ?= "98"
382
383POSTLOG ?= "/var/log/postinstall.log"
384REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>>${POSTLOG} 2>&1', '', d)}"
385
386do_install_append() { 375do_install_append() {
387 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros 376 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
388 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros 377 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
@@ -460,23 +449,6 @@ do_install_append() {
460 rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj 449 rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
461 rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl 450 rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
462 451
463 install -d ${D}/${sysconfdir}/rcS.d
464 # Stop $i getting expanded below...
465 i=\$i
466 cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF
467#!/bin/sh
468for i in \`ls /etc/rpm-postinsts/\`; do
469 i=/etc/rpm-postinsts/$i
470 echo "Running postinst $i..."
471 if [ -f $i ] && $i ${REDIRECT_CMD}; then
472 rm $i
473 else
474 echo "ERROR: postinst $i failed."
475 fi
476done
477rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
478EOF
479 chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts
480} 452}
481 453
482do_install_append_class-native() { 454do_install_append_class-native() {