use of gtk-update-icon-cache?

Ville Skyttä ville.skytta at iki.fi
Sat Apr 30 13:54:56 UTC 2005


On Fri, 2005-04-29 at 12:07 +0200, Thorsten Leemhuis wrote:

> +Requires(post):                gtk2 >= 2.6
[...]
> +touch --no-create %{_datadir}/icons/hicolor || :
> +if [ -x /usr/bin/gtk-update-icon-cache ]; then
> +  gtk-update-icon-cache -q %{_datadir}/icons/hicolor || :
> +fi

gtk-update-icon-cache will only be run if it exists, so the hard
dependency should be dropped.  At least I'm not comfortable adding such
a dep to packages that don't need gtk2 otherwise; there were for example
quite a few KDE packages in your list.

Further, because of the "|| :", the above could be simplified into:

  touch --no-create %{_datadir}/icons/hicolor && \
  gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2>/dev/null || :

Yes, this would hide possible errors from gtk-update-icon-cache, but do
we care about those anyway?

On the other hand, gtk-update-icon-cache has the "-f" option.  Is using
it the same thing as the touch+update-without-f above?  So even more
simplified version could be:

  gtk-update-icon-cache -qf %{_datadir}/icons/hicolor 2>/dev/null || :




More information about the fedora-extras-list mailing list