summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2016-01-02 15:12:43 +0100
committerGilles Dartiguelongue <eva@gentoo.org>2016-01-02 16:41:06 +0100
commit733d155cc7d440ede81cb7d1eb1491f98100f388 (patch)
treef3b75e4832fd14ba60c86bdd20b408108dd567a2 /eclass/gnome2-utils.eclass
parentdev-perl/Package-Stash: Remove old; revbump to drop incorrect dependency Pack... (diff)
downloadgentoo-733d155cc7d440ede81cb7d1eb1491f98100f388.tar.gz
gentoo-733d155cc7d440ede81cb7d1eb1491f98100f388.tar.bz2
gentoo-733d155cc7d440ede81cb7d1eb1491f98100f388.zip
gnome2-utils.eclass: add gnome2_giomodule_cache_update function, bug #518422
Diffstat (limited to 'eclass/gnome2-utils.eclass')
-rw-r--r--eclass/gnome2-utils.eclass23
1 files changed, 23 insertions, 0 deletions
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 94ec32c6a87e..05ddf24c27fa 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -460,6 +460,29 @@ gnome2_query_immodules_gtk3() {
eend $?
}
+# @FUNCTION: gnome2_giomodule_cache_update
+# @USAGE: gnome2_giomodule_cache_update
+# @DESCRIPTION:
+# Updates glib's gio modules cache.
+# This function should be called from pkg_postinst and pkg_postrm.
+gnome2_giomodule_cache_update() {
+ has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
+ local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules"
+
+ if [[ ! -x ${updater} ]]; then
+ updater="${EROOT}/usr/bin/gio-querymodules"
+ fi
+
+ if [[ ! -x ${updater} ]]; then
+ debug-print "${updater} is not executable"
+ return
+ fi
+
+ ebegin "Updating GIO modules cache"
+ ${updater} "${EROOT%/}"/usr/$(get_libdir)/gio/modules
+ eend $?
+}
+
# @FUNCTION: gnome2_disable_deprecation_warning
# @DESCRIPTION:
# Disable deprecation warnings commonly found in glib based packages.