1 |
commit: 733d155cc7d440ede81cb7d1eb1491f98100f388 |
2 |
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 2 14:12:43 2016 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 2 15:41:06 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=733d155c |
7 |
|
8 |
gnome2-utils.eclass: add gnome2_giomodule_cache_update function, bug #518422 |
9 |
|
10 |
eclass/gnome2-utils.eclass | 23 +++++++++++++++++++++++ |
11 |
1 file changed, 23 insertions(+) |
12 |
|
13 |
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass |
14 |
index 94ec32c..05ddf24 100644 |
15 |
--- a/eclass/gnome2-utils.eclass |
16 |
+++ b/eclass/gnome2-utils.eclass |
17 |
@@ -460,6 +460,29 @@ gnome2_query_immodules_gtk3() { |
18 |
eend $? |
19 |
} |
20 |
|
21 |
+# @FUNCTION: gnome2_giomodule_cache_update |
22 |
+# @USAGE: gnome2_giomodule_cache_update |
23 |
+# @DESCRIPTION: |
24 |
+# Updates glib's gio modules cache. |
25 |
+# This function should be called from pkg_postinst and pkg_postrm. |
26 |
+gnome2_giomodule_cache_update() { |
27 |
+ has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
28 |
+ local updater="${EROOT}/usr/bin/${CHOST}-gio-querymodules" |
29 |
+ |
30 |
+ if [[ ! -x ${updater} ]]; then |
31 |
+ updater="${EROOT}/usr/bin/gio-querymodules" |
32 |
+ fi |
33 |
+ |
34 |
+ if [[ ! -x ${updater} ]]; then |
35 |
+ debug-print "${updater} is not executable" |
36 |
+ return |
37 |
+ fi |
38 |
+ |
39 |
+ ebegin "Updating GIO modules cache" |
40 |
+ ${updater} "${EROOT%/}"/usr/$(get_libdir)/gio/modules |
41 |
+ eend $? |
42 |
+} |
43 |
+ |
44 |
# @FUNCTION: gnome2_disable_deprecation_warning |
45 |
# @DESCRIPTION: |
46 |
# Disable deprecation warnings commonly found in glib based packages. |