ScriptletSnippets: desktop-database,mimeinfo

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Sat Feb 4 13:16:07 UTC 2006


nicolas.mailhot at laposte.net (Nicolas Mailhot) writes:

> You have exactly the same problem with fonts and fc-cache.

The fc-cache case is easier because the locations of all possible cache
files are known to the 'fc-cache' program. For gtk-update-icon-cache,
you have to enumerate them manually.


> postinstall scriptlet (using /bin/sh):
> if [ -x /usr/bin/fc-cache ]; then
>   /usr/bin/fc-cache /usr/share/fonts

Here, a '|| :' should be added. Else, scriptlets will fail when /usr/share
is shared between multiple hosts and mounted read-only therefore.


> fi

This scriptlet can be written shorter as

| %post
| /usr/bin/fc-cache /usr/share/fonts >/dev/null 2>&1 || :



Enrico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20060204/72e99e48/attachment.sig>


More information about the fedora-extras-list mailing list