diff --git a/gtk2.changes b/gtk2.changes index 8c8c871..9ca7a93 100644 --- a/gtk2.changes +++ b/gtk2.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Jun 27 12:26:52 UTC 2017 - dimstar@opensuse.org + +- Migrate %icon_theme_cache_post/postun macro from + hicolor-icon-theme to gtk2-tools file triggers. Any package + installing icons below /usr/share/icons will trigger. Each + package will produce the cache for every icon theme being + updated. The same trigger is also added to gtk3-tools, where only + the one owning the current instance of + /usr/bin/gtk-update-icon-cache update-alternatie link actually + executes the update. + ------------------------------------------------------------------- Wed Jun 14 08:01:41 UTC 2017 - olaf@aepfle.de diff --git a/gtk2.spec b/gtk2.spec index 5645e77..a48df13 100644 --- a/gtk2.spec +++ b/gtk2.spec @@ -446,6 +446,24 @@ fi update-alternatives --install %{_bindir}/gtk-update-icon-cache gtk-update-icon-cache %{_bindir}/gtk-update-icon-cache-2.0 2 \ --slave %{_mandir}/man1/gtk-update-icon-cache.1.gz gtk-update-icon-cache.1.gz %{_mandir}/man1/gtk-update-icon-cache-2.0.1.gz +%filetriggerin tools -- %{_datadir}/icons +if [ "$(realpath %{_bindir}/gtk-update-icon-cache)" = "%{_bindir}/gtk-update-icon-cache-2.0" ]; then + for ICON_THEME in $(cut -d / -f 5 | sort -u); do + if [ -f "%{_datadir}/icons/${ICON_THEME}/index.theme" ]; then + %{_bindir}/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" + fi + done +fi + +%filetriggerpostun tools -- %{_datadir}/icons +if [ "$(realpath %{_bindir}/gtk-update-icon-cache)" = "%{_bindir}/gtk-update-icon-cache-2.0" ]; then + for ICON_THEME in $(cut -d / -f 5 | sort -u); do + if [ -f "%{_datadir}/icons/${ICON_THEME}/index.theme" ]; then + %{_bindir}/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" + fi + done +fi + %if 0 # No need to call gtk-query-immodules-2.0 in postun: # - if it's an upgrade, it will have been called in post