meta-tizen: message-port: Prevent running ldconfig if not on system 64/58064/1
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 20 Jan 2016 09:33:25 +0000 (10:33 +0100)
committerLeon Anavi <leon.anavi@konsulko.com>
Wed, 27 Jan 2016 08:27:04 +0000 (08:27 +0000)
Without this change,
bitbake tries to run ldconfig on host instead
and then complains (but not fail !) about permission issue like :

   /sbin/ldconfig.real: \
   Can't create temporary cache file /etc/ld.so.cache~: \
   Permission denied

Note, "or condition" is prefered because of shell's -e option.

Change-Id: I0f1c9b6389ed37cccf6ad9d2a6bf77966043f2da
(From meta-tizen rev: 34fe05b1b2c0258c570cf77d05c9ab6ef56fa49d)
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
meta-tizen/meta-tizen-common-base/recipes-application-framework/message-port/message-port.inc

index e023e82..5f59c51 100644 (file)
@@ -113,7 +113,7 @@ do_install() {
 pkg_postinst_libmessage-port() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
@@ -136,7 +136,7 @@ pkg_postrm_${PN}() {
 pkg_postrm_libmessage-port() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
     # daemon: message-port
 
 }