Ville Skyttä ville.skytta@iki.fi writes:
%postun if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi
The 'touch' should be inconditional and outside of the 'if' block. E.g. when we have a transaction like
1. UPDATE new1 2. UPDATE old 3. UPDATE new0 4. ERASE new0 5. ERASE old 6. ERASE new1 7. %posttrans
where newX have the scriptlet above and 'old' has a legacy scriptlet which executes 'gtk-update-icon-cache' everytime. Then, 'old' will update the cache in step 5 and %posttrans will be a noop. Changes in step 6 will be ignored and system has the cache from step 5.
Enrico