]> code.ossystems Code Review - openembedded-core.git/commitdiff
update_gio_module_cache: Do not chown a non-existing file
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Wed, 29 Mar 2017 23:16:06 +0000 (01:16 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Apr 2017 11:36:44 +0000 (12:36 +0100)
Only change the ownership of ${libdir}/gio/modules/giomodule.cache if
it exists.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/postinst-intercepts/update_gio_module_cache

index 92092f2144515504cc11227e0441a387c294bfde..fc3f9d0d6ced1cc8e1b240635d83b7355d44e4d4 100644 (file)
@@ -3,7 +3,7 @@
 set -e
 
 PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \
-        $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/
-
-chown root:root $D${libdir}/gio/modules/giomodule.cache
+       $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/
 
+[ ! -e $D${libdir}/gio/modules/giomodule.cache ] ||
+       chown root:root $D${libdir}/gio/modules/giomodule.cache