*.eclass: Include GNOME2_ECLASS_ICONS condition in postrm as well
authorMichał Górny <mgorny@gentoo.org>
Sat, 8 Jul 2017 19:47:26 +0000 (21:47 +0200)
committerMichał Górny <mgorny@gentoo.org>
Fri, 8 Sep 2017 07:32:25 +0000 (09:32 +0200)
The original GNOME2_ECLASS_ICONS patch has moved the condition from
gnome2_icon_cache_update to postinst phases of functions using
the preinst/postinst logic but accidentally omitted postrm. Include it
there as well to restore the old behavior.

eclass/gnome2.eclass
eclass/kde4-base.eclass
eclass/kde5.eclass
eclass/xfconf.eclass

index feb6301221eaf92b9c33206e67f887c731d1a5fe..cb233e747605b7973d0ad35383c04d0794a43d1c 100644 (file)
@@ -359,7 +359,9 @@ gnome2_pkg_postinst() {
 # Handle scrollkeeper, GSettings, Icons, desktop and mime database updates.
 gnome2_pkg_postrm() {
        xdg_pkg_postrm
-       gnome2_icon_cache_update
+       if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+               gnome2_icon_cache_update
+       fi
        gnome2_schemas_update
        gnome2_scrollkeeper_update
 
index 07b188d044f07476e69e2957e7d3341826b138c2..b43f0600e5e267971db92c9a7ff686b38c162792 100644 (file)
@@ -950,7 +950,9 @@ kde4-base_pkg_postinst() {
 kde4-base_pkg_postrm() {
        debug-print-function ${FUNCNAME} "$@"
 
-       gnome2_icon_cache_update
+       if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+               gnome2_icon_cache_update
+       fi
        fdo-mime_desktop_database_update
        fdo-mime_mime_database_update
        buildsycoca
index b48dd4b46b159d0064fdade1b92c7af026e63104..256c59bc8737f4c73fa3ed583332b1a1f4f2354d 100644 (file)
@@ -803,7 +803,9 @@ kde5_pkg_postinst() {
 kde5_pkg_postrm() {
        debug-print-function ${FUNCNAME} "$@"
 
-       gnome2_icon_cache_update
+       if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+               gnome2_icon_cache_update
+       fi
        xdg_pkg_postrm
 }
 
index b91d0fe1eda365b301c9087c432eff8f287c996e..4cbcb8fa9a4ebfb6f0fe5b128e389718c81970b6 100644 (file)
@@ -151,5 +151,7 @@ xfconf_pkg_postrm() {
        debug-print-function ${FUNCNAME} "$@"
        fdo-mime_desktop_database_update
        fdo-mime_mime_database_update
-       gnome2_icon_cache_update
+       if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
+               gnome2_icon_cache_update
+       fi
 }