summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2018-08-26 06:06:29 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-29 15:42:21 +0100
commit14c783e684d49aaddc8496c5ae1c9d1ae2c99a6e (patch)
treee2724c04824b3c855f070853376fcbfe76b4e9d3
parente0a10c5bcd66abcf0a27487ed17c1c568b653b40 (diff)
downloadopenembedded-core-contrib-14c783e684d49aaddc8496c5ae1c9d1ae2c99a6e.tar.gz
openembedded-core-contrib-14c783e684d49aaddc8496c5ae1c9d1ae2c99a6e.tar.bz2
openembedded-core-contrib-14c783e684d49aaddc8496c5ae1c9d1ae2c99a6e.zip
update_gtk_immodules_cache: update for multilib
Postinstall script update_gtk_immodules_cache calls ${bindir}/gtk-query-immodules-${version}. When multilib is enabled, both packages foo and lib32-foo call ${bindir}/gtk-query-immodules-${version} and one of them will fail to run obviously. Duplicate install files gtk-query-immodules-${version} to ${libexecdir} with ${MLPREFIX}. And update update_gtk_immodules_cache calls proper binary. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-gnome/gtk+/gtk+.inc4
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3.inc4
-rw-r--r--scripts/postinst-intercepts/update_gtk_immodules_cache8
3 files changed, 12 insertions, 4 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+.inc b/meta/recipes-gnome/gtk+/gtk+.inc
index 558bc485ad..b8f0abb49e 100644
--- a/meta/recipes-gnome/gtk+/gtk+.inc
+++ b/meta/recipes-gnome/gtk+/gtk+.inc
@@ -90,6 +90,10 @@ do_install () {
install -m 0644 ${S}/gtk/gtkfilesystemmodel.h ${D}${includedir}/gtk-2.0/gtk/
mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0
+
+ # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache
+ mkdir -p ${D}${libexecdir}
+ cp ${D}${bindir}/gtk-query-immodules-2.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-2.0
}
SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
index 420ead2ca2..d8242ad5fc 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -53,6 +53,10 @@ PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,way
do_install_append() {
mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
+
+ # duplicate gtk-query-immodules for post install script update_gtk_immodules_cache
+ mkdir -p ${D}${libexecdir}
+ cp ${D}${bindir}/gtk-query-immodules-3.0 ${D}${libexecdir}/${MLPREFIX}gtk-query-immodules-3.0
}
PACKAGES =+ "${PN}-demo"
diff --git a/scripts/postinst-intercepts/update_gtk_immodules_cache b/scripts/postinst-intercepts/update_gtk_immodules_cache
index d85d3622c2..395516971e 100644
--- a/scripts/postinst-intercepts/update_gtk_immodules_cache
+++ b/scripts/postinst-intercepts/update_gtk_immodules_cache
@@ -2,14 +2,14 @@
set -e
-if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then
- PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D/${bindir}/gtk-query-immodules-2.0 \
+if [ -x $D${libexecdir}/${binprefix}gtk-query-immodules-2.0 ]; then
+ PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gtk-query-immodules-2.0 \
> $D${libdir}/gtk-2.0/2.10.0/immodules.cache &&
sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
chown root:root $D${libdir}/gtk-2.0/2.10.0/immodules.cache
fi
-if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
- PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D/${bindir}/gtk-query-immodules-3.0 \
+if [ -x $D${libexecdir}/${binprefix}gtk-query-immodules-3.0 ]; then
+ PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}gtk-query-immodules-3.0 \
> $D${libdir}/gtk-3.0/3.0.0/immodules.cache &&
sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
chown root:root $D${libdir}/gtk-3.0/3.0.0/immodules.cache