meta-tizen: murphy: Prevent running ldconfig if not on system 63/58063/1
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 20 Jan 2016 09:33:26 +0000 (10:33 +0100)
committerLeon Anavi <leon.anavi@konsulko.com>
Wed, 27 Jan 2016 08:26:57 +0000 (08:26 +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: I2ae3467c0f0e8b5b620d1772774771e3c33774ae
(From meta-tizen rev: 759339cc168638291a5e1ab3f82b6b403786907d)
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
meta-tizen/meta-tizen-common-share/recipes-core/murphy/murphy.inc

index f37a1d9..82e7d04 100644 (file)
@@ -300,7 +300,7 @@ do_install() {
 pkg_postinst_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
@@ -309,49 +309,49 @@ pkg_postinst_${PN}() {
 
     /bin/systemctl --user enable --global murphyd.service
     setcap 'cap_net_admin=+ep' $D${prefix}/bin/murphyd
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 pkg_postinst_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 pkg_postinst_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 pkg_postinst_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 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
 
 }
 
@@ -361,42 +361,42 @@ pkg_postrm_${PN}() {
     if [ "$1" = "0" ]; then
     systemctl --user disable --global murphyd.service
     fi
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 pkg_postrm_${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
 
 }
 
 pkg_postrm_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }
 
 pkg_postrm_${PN}() {
     #!/bin/sh -e
 
-    ldconfig
+    [ "" != "$D" ] || ldconfig
 
 }