Icon caching is unusable

John (J5) Palmieri johnp at redhat.com
Mon Oct 3 21:17:08 EEST 2005

On Mon, 2005-10-03 at 19:55 +0200, Josselin Mouette wrote:
> Le lundi 03 octobre 2005 à 11:26 -0400, Matthias Clasen a écrit :
> > If you look at Fedora, this is handled in the %post hook of all packages
> > that install icons. Installing an icon is a two-step process 
> > 
> > 1) copy the icon to the right directory
> > 2) touch the toplevel theme directory
> This is probably the most stupid idea I've heard of on the subject. If
> you take care of a postinstall script, why do you only touch the
> toplevel directory instead of generating the cache?

You might want to think statements through before you post.  If you
update 100 packages which all update the cache you are going to be
sitting around for a bit.  If you touch the directory then the cache
will only update when needed.

> And of course, it doesn't take into account the fact that packages
> currently don't do that.

Then you have to talk to those package owners and ask them to do that.
It really isn't all that hard as we did it in Fedora.  It is like a new
file popped up in the tarball you would still have to handle it in the
package.  This adds one more thing a package's post script has to
handle.  Of course you could also hack something into dpkg (or rpm or
autotools, etc.) that touched the theme directory every time an icon was
checked into it.  Or you could run a daemon with inotify kernels and
update the cache based on inotify events from the theme directory.  The
first option is the simplest though.

John (J5) Palmieri <johnp at redhat.com>

More information about the xdg mailing list