When build sato sdk image, opkg will be installed to image even the
image package type is set to RPM. This causes the script file
run-postinsts installed by rpm will be overwrited by opkg.

Judge the image package type and don't create run-scripts file when
package type is not ipk.

[YOCTO #3223]

Signed-off-by: Kang Kai <kai.k...@windriver.com>
---
 meta/recipes-devtools/opkg/opkg.inc |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/opkg/opkg.inc 
b/meta/recipes-devtools/opkg/opkg.inc
index f9c1202..bc80cb0 100644
--- a/meta/recipes-devtools/opkg/opkg.inc
+++ b/meta/recipes-devtools/opkg/opkg.inc
@@ -59,10 +59,16 @@ do_install_append_class-native() {
 
 POSTLOG ?= "/var/log/postinstall.log"
 REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', 
'>${POSTLOG} 2>&1', '', d)}"
+PKGTYPE = "${@d.getVar('IMAGE_PKGTYPE', True)}"
 
 pkg_postinst_${PN} () {
 #!/bin/sh
 if [ "x$D" != "x" ]; then
+       # if installed to a rpm/deb based image, don't create run-postinsts file
+       if [ "x${PKGTYPE}" != "xipk" ]; then
+               exit 0
+       fi
+
        install -d $D${sysconfdir}/rcS.d
        # this happens at S98 where our good 'ole packages script used to run
        echo "#!/bin/sh
-- 
1.7.5.4


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to