diff options
Diffstat (limited to 'sysui/desktop/freedesktop')
-rw-r--r-- | sysui/desktop/freedesktop/freedesktop-menus.spec | 87 |
1 files changed, 62 insertions, 25 deletions
diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec index 793c95629878..517c1d39ee3c 100644 --- a/sysui/desktop/freedesktop/freedesktop-menus.spec +++ b/sysui/desktop/freedesktop/freedesktop-menus.spec @@ -92,29 +92,50 @@ fi # afterwards if [ "$1" = "1" ] ; then # first install -if [ -x /opt/gnome/bin/update-desktop-database ]; then + if [ -x /opt/gnome/bin/update-desktop-database ]; then /opt/gnome/bin/update-desktop-database -q -elif (which update-desktop-database); then - update-desktop-database -q /usr/share/applications -fi + elif (which update-desktop-database); then + update-desktop-database -q /usr/share/applications + fi + if (which update-mime-database); then update-mime-database /usr/share/mime fi + + + +#run always for theme in gnome hicolor locolor; do if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then # touch it, just in case we cannot find the binary... touch /usr/share/icons/$theme if [ -x /opt/gnome/bin/gtk-update-icon-cache ]; then - /opt/gnome/bin/gtk-update-icon-cache -q /usr/share/icons/$theme + /opt/gnome/bin/gtk-update-icon-cache --ignore-theme-index -f /usr/share/icons/$theme elif (which gtk-update-icon-cache); then - gtk-update-icon-cache -q /usr/share/icons/$theme + gtk-update-icon-cache -f /usr/share/icons/$theme fi # ignore errors (e.g. when there is a cache, but no index.theme) - true + #true fi done fi + +# for theme in gnome hicolor locolor; do +# if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then + # touch it, just in case we cannot find the binary... +# touch /usr/share/icons/$theme +# if [ -x /opt/gnome/bin/gtk-update-icon-cache ]; then +# /opt/gnome/bin/gtk-update-icon-cache -q /usr/share/icons/$theme +# elif (which gtk-update-icon-cache); then +# gtk-update-icon-cache -q /usr/share/icons/$theme +# fi +# # ignore errors (e.g. when there is a cache, but no index.theme) +# true +# fi +# done +#fi + # update /etc/mime.types # backing out existing entries to avoid duplicates sed ' @@ -280,29 +301,45 @@ fi %postun if [ "$1" = 0 ] ; then # only run when erasing the package - other cases handled by the triggers -if [ -x /opt/gnome/bin/update-desktop-database ]; then + if [ -x /opt/gnome/bin/update-desktop-database ]; then /opt/gnome/bin/update-desktop-database -q -elif (which update-desktop-database); then - update-desktop-database -q -fi + elif (which update-desktop-database); then + update-desktop-database -q + fi # run always - both when upgrading as well as when erasing the package -if (which update-mime-database); then - update-mime-database /usr/share/mime + if (which update-mime-database); then + update-mime-database /usr/share/mime + fi + +#run always + for theme in gnome hicolor locolor; do + if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then + # touch it, just in case we cannot find the binary... + touch /usr/share/icons/$theme + if [ -x /opt/gnome/bin/gtk-update-icon-cache ]; then + /opt/gnome/bin/gtk-update-icon-cache --ignore-theme-index -f /usr/share/icons/$theme + elif (which gtk-update-icon-cache); then + gtk-update-icon-cache -f /usr/share/icons/$theme + fi + #true + fi + done fi -for theme in gnome hicolor locolor; do - if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then + +#for theme in gnome hicolor locolor; do +# if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then # touch it, just in case we cannot find the binary... - touch /usr/share/icons/$theme - if [ -x /opt/gnome/bin/gtk-update-icon-cache ]; then - /opt/gnome/bin/gtk-update-icon-cache -q /usr/share/icons/$theme - elif (which gtk-update-icon-cache); then - gtk-update-icon-cache -q /usr/share/icons/$theme - fi +# touch /usr/share/icons/$theme +# if [ -x /opt/gnome/bin/gtk-update-icon-cache ]; then +# /opt/gnome/bin/gtk-update-icon-cache -q /usr/share/icons/$theme +# elif (which gtk-update-icon-cache); then +# gtk-update-icon-cache -q /usr/share/icons/$theme +# fi # ignore errors (e.g. when there is a cache, but no index.theme) - true - fi -done -fi +# true +# fi +#done +#fi %files # specify stale symlinks verbatim, not as glob - a change in recent versions of # glibc breaks rpm unless rpm is build with internal glob-matching (issue 49374) |