summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/opkg
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:16:42 +0100
commitd7fd56df0a4954954d6d0764ae06beb869e6b99a (patch)
tree5e137eb7e23000f3078a4ba2ac2521c2fd6da227 /meta/recipes-devtools/opkg
parent01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978 (diff)
downloadopenembedded-core-d7fd56df0a4954954d6d0764ae06beb869e6b99a.tar.gz
openembedded-core-d7fd56df0a4954954d6d0764ae06beb869e6b99a.tar.bz2
openembedded-core-d7fd56df0a4954954d6d0764ae06beb869e6b99a.zip
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/opkg')
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
index f9c120257b..ff26b04b6e 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -62,8 +62,9 @@ REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG}
pkg_postinst_${PN} () {
#!/bin/sh
-if [ "x$D" != "x" ]; then
+if [ "x$D" != "x" ] && [ -f $D/var/lib/opkg/status ]; then
install -d $D${sysconfdir}/rcS.d
+
# this happens at S98 where our good 'ole packages script used to run
echo "#!/bin/sh
opkg-cl configure ${REDIRECT_CMD}