Created attachment 381746 [details, diff] glib-2.40.0-r1.ebuild.patch Would be nice if dev-libs/glib and all packages which install gio modules run gio-querymodules in pkg_postinst() phase. This should speed up GIO at runtime, preventing it from trying and opening all available modules. Fedora do the same in their spec files, see [1][2] for examples. Attaching a patch for the glib ebuild. I'm not sure if it is implemented correctly, but it did what I wanted: $ LANG=C ls -l /usr/bin/gio-querymodules-* -rwxr-xr-x 1 root root 10088 Jul 28 23:06 /usr/bin/gio-querymodules-amd64 -rwxr-xr-x 1 root root 9452 Jul 28 23:06 /usr/bin/gio-querymodules-x86 $ LANG=C ls -l /usr/lib*/gio/modules/giomodule.cache -rw-r--r-- 1 root root 158 Jul 28 23:07 /usr/lib/gio/modules/giomodule.cache -rw-r--r-- 1 root root 317 Jul 28 23:07 /usr/lib64/gio/modules/giomodule.cache Non-comprehensive list of packages which should do the same cache update: $ qfile /usr/lib64/gio/modules/* | awk '{print $1}' | sort -u gnome-base/dconf gnome-base/gconf gnome-base/gvfs net-libs/glib-networking [1] http://pkgs.fedoraproject.org/cgit/glib2.git/tree/glib2.spec [2] http://pkgs.fedoraproject.org/cgit/dconf.git/tree/dconf.spec
pkg_postrm() should delete these cache files.
Hmm.. maybe pkg_prerm() would be better in that case? This way empty dirs (/usr/lib64/gio{,/modules}) will be removed by PM.
(In reply to Alexander Tsoy from comment #0) > Non-comprehensive list of packages which should do the same cache update: > > $ qfile /usr/lib64/gio/modules/* | awk '{print $1}' | sort -u > gnome-base/dconf > gnome-base/gconf > gnome-base/gvfs > net-libs/glib-networking Cache should be updated in pkg_postinst() and pkg_postrm()
Created attachment 385112 [details, diff] glib-2.40.0-r1.ebuild.patch - Use MULTILIB_CHOST_TOOLS instead of manually renaming binaries - Remove cache files in pkg_prerm()
Created attachment 385122 [details, diff] glib-networking-2.40.1-r1.ebuild.patch Just an example of the patch needed for other packages installing GIO modules.
I think last time we talked about this in the team (months ago... I can't remember :S) were thinking on adding tools for this in gnome2-utils.eclass like it's done with gnome2_gdk_pixbuf_update gnome2_query_immodules_gtk*...
Following commits should solve this problem: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cc8b1b22ee34d6b0c84ba5e822fb1a0def6fc01 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c9d50305560842541547d9fb5ccdaaf0d438146 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=733d155cc7d440ede81cb7d1eb1491f98100f388 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd6b8969ec32e11c022b759c13885fee15ae5005
commit 0bd3df485ff4afda075d8872614c0ab04e1dfd1c Author: Mart Raudsepp <leio@gentoo.org> Date: Tue Mar 28 16:32:33 2017 +0300 dev-libs/glib: fix GIO module cache file ownership and cross-compilation Bug 518422 tried to fix module cache file ownership to glib, but the ebuild changes missed /modules path and used $libdir/gio/ instead of $libdir/gio/modules While cross-compiling, we can't generate the cache file, so we shouldn't die out either. Instead of removing the die, rework it all to not do any of it while cross-compiling, because we'd end up with an empty glib owned cache file, which could result in no modules working at all as a cache file is present from the preinst touch. Gentoo-bug: 518422 Gentoo-bug: 613306 Thanks-to: Alexis Ballier <aballier@gentoo.org>