use of gtk-update-icon-cache?

Thorsten Leemhuis fedora at leemhuis.info
Sat Apr 30 18:30:17 UTC 2005


Am Samstag, den 30.04.2005, 16:54 +0300 schrieb Ville Skyttä:
> 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. 

I'm was think about that also and I'm all for it.

>  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.

You're right of course. As I said, it was a quick lookup of packages
that might show this problem. And maybe at that moment I forgot the
other major desktop environment ;-)

> 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 || :

Yeah, it seems you're right. Or are there opinios against this solution?
-- 
Thorsten Leemhuis <fedora at leemhuis.info>




More information about the fedora-extras-list mailing list