festival: Prevent running ldconfig if not on system 71/57471/1
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 20 Jan 2016 09:33:25 +0000 (10:33 +0100)
committerPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 20 Jan 2016 09:39:27 +0000 (10:39 +0100)
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: I2de3d79aef7c884727f91538ff3ac73babb07125
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
meta-tizen-common-base/recipes-extended/festival/festival.inc

index 3a67287..919d8cb 100644 (file)
@@ -222,28 +222,28 @@ do_install() {
 pkg_postinst_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 pkg_postinst_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 pkg_postrm_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 pkg_postrm_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }