summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dpkg
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-04-11 14:09:25 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-11 12:20:35 +0100
commit8b29120a8cdd92a0429f383f4811f7f84c6c350e (patch)
treed83f06a3bfb384626458b354ac521eb2db1ea7d1 /meta/recipes-devtools/dpkg
parent44120a053c0cf2c7134bb1ee29854dddf28e4cf8 (diff)
downloadpoky-8b29120a8cdd92a0429f383f4811f7f84c6c350e.tar.gz
dpkg, opkg, rpm-postinst: fix overwriting the run-postinstall script
If multiple package managers are installed in the image, they will overwrite each other's run-postinsts script, resulting in postinstalls not beeing run at all at first boot. What this patch does: * checks whether opkg/dpks/rpm is actually used to install the packages and, only after, creates the run-postinsts script; * brings dpkg recipe in sync with opkg: moves the script creation from do_install to postinstall; * move creation of run-postinsts script (rpm-postinsts recipe) to the postinstall scriptlet in order to better control the creation of the script according to the package manager used; [YOCTO #4231] [YOCTO #4179] (From OE-Core rev: d7fd56df0a4954954d6d0764ae06beb869e6b99a) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@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.inc23
1 files changed, 14 insertions, 9 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 6bb1e16617..555492089f 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -39,15 +39,6 @@ POSTLOG ?= "/var/log/postinstall.log"
39REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}" 39REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}"
40 40
41DPKG_INIT_POSITION ?= "98" 41DPKG_INIT_POSITION ?= "98"
42do_install_prepend () {
43 install -d ${D}/${sysconfdir}/rcS.d
44 # this happens at S98 where our good 'ole packages script used to run
45 echo "#!/bin/sh
46dpkg --configure -a ${REDIRECT_CMD}
47rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
48" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
49 chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
50}
51 42
52do_install_append () { 43do_install_append () {
53 if [ "${PN}" = "dpkg-native" ]; then 44 if [ "${PN}" = "dpkg-native" ]; then
@@ -67,6 +58,20 @@ do_install_append_class-native () {
67 done 58 done
68} 59}
69 60
61pkg_postinst_${PN} () {
62#!/bin/sh
63if [ "x$D" != "x" ] && [ -f $D/var/lib/dpkg/status ]; then
64 install -d ${D}/${sysconfdir}/rcS.d
65
66 # this happens at S98 where our good 'ole packages script used to run
67 echo "#!/bin/sh
68dpkg --configure -a ${REDIRECT_CMD}
69rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
70" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
71 chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
72fi
73}
74
70PROV = "virtual/update-alternatives" 75PROV = "virtual/update-alternatives"
71PROV_class-native = "" 76PROV_class-native = ""
72 77