commit: cd6b8969ec32e11c022b759c13885fee15ae5005 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> AuthorDate: Sat Jan 2 14:13:10 2016 +0000 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> CommitDate: Sat Jan 2 15:41:06 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd6b8969
gnome2.eclass: make use of gnome2_giomodule_cache_update, bug #518422 eclass/gnome2.eclass | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass index 000b3d6..55441b9 100644 --- a/eclass/gnome2.eclass +++ b/eclass/gnome2.eclass @@ -57,6 +57,10 @@ ELTCONF=${ELTCONF:-""} # to handle it properly. It will enable minimal debug with USE=-debug. # Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK. +# @ECLASS-VARIABLE: GNOME2_ECLASS_GIO_MODULES +# @INTERNAL +# @DESCRIPTION: +# Array containing glib GIO modules if [[ ${GCONF_DEBUG} != "no" ]]; then IUSE="debug" @@ -241,6 +245,15 @@ gnome2_pkg_preinst() { gnome2_schemas_savelist gnome2_scrollkeeper_savelist gnome2_gdk_pixbuf_savelist + + local f + + GNOME2_ECLASS_GIO_MODULES=() + while IFS= read -r -d '' f; do + GNOME2_ECLASS_GIO_MODULES+=( ${f} ) + done < <(cd "${D}" && find usr/$(get_libdir)/gio/modules -type f -print0 2>/dev/null) + + export GNOME2_ECLASS_GIO_MODULES } # @FUNCTION: gnome2_pkg_postinst @@ -254,6 +267,10 @@ gnome2_pkg_postinst() { gnome2_schemas_update gnome2_scrollkeeper_update gnome2_gdk_pixbuf_update + + if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then + gnome2_giomodule_cache_update + fi } # # FIXME Handle GConf schemas removal @@ -269,4 +286,8 @@ gnome2_pkg_postrm() { gnome2_icon_cache_update gnome2_schemas_update gnome2_scrollkeeper_update + + if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then + gnome2_giomodule_cache_update + fi }