From 1f01639cf5d82e84f0e18b0a6e1816dc84079e41717d485d34a68dee3f265be3 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dimstar@opensuse.org>
Date: Thu, 31 Aug 2017 07:43:01 +0000
Subject: [PATCH] Accepting request 519387 from GNOME:Next

Scripted push of project GNOME:Next

OBS-URL: https://build.opensuse.org/request/show/519387
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/hicolor-icon-theme?expand=0&rev=36
---
 hicolor-icon-theme.changes |  8 ++++++++
 hicolor-icon-theme.spec    |  5 +----
 macros.hicolor             | 25 ++++---------------------
 3 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/hicolor-icon-theme.changes b/hicolor-icon-theme.changes
index 19e9f2d..84b851b 100644
--- a/hicolor-icon-theme.changes
+++ b/hicolor-icon-theme.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Tue Jun 27 12:29:12 UTC 2017 - dimstar@opensuse.org
+
+- Migrate %icon_theme_cache_post/postun macro from
+  hicolor-icon-theme to gtk2-tools and gtk3-tools file triggers.
+  The macros are defined to be nop, in order to not break all spec
+  files for now.
+
 -------------------------------------------------------------------
 Thu May 26 14:01:13 UTC 2016 - tchvatal@suse.com
 
diff --git a/hicolor-icon-theme.spec b/hicolor-icon-theme.spec
index 45d0233..d4a8c22 100644
--- a/hicolor-icon-theme.spec
+++ b/hicolor-icon-theme.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package hicolor-icon-theme
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -47,9 +47,6 @@ chmod -x COPYING
 # Install rpm macros
 install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.hicolor
 
-# No %%post/%%postun: there are actually no icons in this package. It's just the
-# directory structure.
-
 %files
 %defattr(-, root, root)
 %doc COPYING ChangeLog README
diff --git a/macros.hicolor b/macros.hicolor
index 89c42c4..a80fdc8 100644
--- a/macros.hicolor
+++ b/macros.hicolor
@@ -33,27 +33,10 @@ fi
 mkdir -p "%{buildroot}%{_datadir}/icons/%1"                                                        \
 touch "%{buildroot}%{_datadir}/icons/%1/icon-theme.cache"
 
-# On install, update the icon cache
+# The macro is a compatibility place holder to not break .spec files. It has been migrated to be a file trigger
 %icon_theme_cache_post()                                                                           \
-%if "x%1" != "x%%1"                                                                                \
-ICON_THEME="%1"                                                                                    \
-%else                                                                                              \
-ICON_THEME="hicolor"                                                                               \
-%endif                                                                                             \
-if test -x %{_bindir}/gtk-update-icon-cache; then                                                  \
-  %{_bindir}/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true       \
-fi 
+%nil
 
-# On uninstall, update the icon cache. Note: we ignore upgrades (already
-# handled in %post of the new package).
+# The macro is a compatibility place holder to not break .spec files. It has been migrated to be a file trigger
 %icon_theme_cache_postun()                                                                         \
-if [ $1 -eq 0 ]; then                                                                              \
-%if "x%1" != "x%%1"                                                                                \
-  ICON_THEME="%1"                                                                                  \
-%else                                                                                              \
-  ICON_THEME="hicolor"                                                                             \
-%endif                                                                                             \
-  if test -x %{_bindir}/gtk-update-icon-cache; then                                                \
-    %{_bindir}/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true     \
-  fi                                                                                               \
-fi
+%nil