[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ScriptletSnippets: desktop-database,mimeinfo



nicolas mailhot 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

Attachment: pgp8FFASORcBT.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]