1 |
Move the GNOME2_ECLASS_GLIB_SCHEMAS conditional from |
2 |
gnome2_schemas_update straight into the implementation of gnome2.eclass |
3 |
postinst/postrm. |
4 |
|
5 |
This variable is set in preinst to indicate whether any files were |
6 |
installed. However, the updater itself does not use the list in any way |
7 |
and updates all the schemas anyway. |
8 |
|
9 |
Therefore, avoid requiring the ebuilds to explicitly define |
10 |
preinst/postinst when it is known that the package installs schemas, |
11 |
and instead let gnome2_schemas_update called in postinst/postrm update |
12 |
schemas unconditionally. |
13 |
--- |
14 |
eclass/gnome2-utils.eclass | 5 ----- |
15 |
eclass/gnome2.eclass | 8 ++++++-- |
16 |
2 files changed, 6 insertions(+), 7 deletions(-) |
17 |
|
18 |
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass |
19 |
index a89b9885c391..9b4296c11fad 100644 |
20 |
--- a/eclass/gnome2-utils.eclass |
21 |
+++ b/eclass/gnome2-utils.eclass |
22 |
@@ -381,11 +381,6 @@ gnome2_schemas_update() { |
23 |
return |
24 |
fi |
25 |
|
26 |
- if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then |
27 |
- debug-print "No GSettings schemas to update" |
28 |
- return |
29 |
- fi |
30 |
- |
31 |
ebegin "Updating GSettings schemas" |
32 |
${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas" &>/dev/null |
33 |
eend $? |
34 |
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass |
35 |
index cb233e747605..d2b45ad560b3 100644 |
36 |
--- a/eclass/gnome2.eclass |
37 |
+++ b/eclass/gnome2.eclass |
38 |
@@ -340,7 +340,9 @@ gnome2_pkg_postinst() { |
39 |
if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then |
40 |
gnome2_icon_cache_update |
41 |
fi |
42 |
- gnome2_schemas_update |
43 |
+ if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then |
44 |
+ gnome2_schemas_update |
45 |
+ fi |
46 |
gnome2_scrollkeeper_update |
47 |
gnome2_gdk_pixbuf_update |
48 |
|
49 |
@@ -362,7 +364,9 @@ gnome2_pkg_postrm() { |
50 |
if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then |
51 |
gnome2_icon_cache_update |
52 |
fi |
53 |
- gnome2_schemas_update |
54 |
+ if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then |
55 |
+ gnome2_schemas_update |
56 |
+ fi |
57 |
gnome2_scrollkeeper_update |
58 |
|
59 |
if [[ ${#GNOME2_ECLASS_GIO_MODULES[@]} -gt 0 ]]; then |
60 |
-- |
61 |
2.13.2 |