privacy-manager-server: Prevent running ldconfig if not on system 72/57472/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: I06d3731455912b536c053b29833de9d44832027b
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
meta-tizen-common-base/recipes-security/privacy-manager-server/privacy-manager-server.inc

index 01c3909..eb5bfef 100644 (file)
@@ -171,7 +171,7 @@ pkg_postinst_privacy-manager-client() {
 pkg_postinst_privacy-manager-server() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
     echo "Check privacy DB"
     if [ ! -f $D${prefix}/dbspace/.privacy.db ]
     then