# HG changeset patch # User Christopher Rogers # Date 1331136318 18000 # Node ID 5944a15e613059a6cc993e6460a66dc4c2fae02f # Parent 5c6b015d6d6689a489e63afd57b242ca4f0879c1 tazpkg: Add support to use gtk-update-icon-cache if /usr/share/icons/hicolor is in files.list. Also add support to use glib-compile-schemas if /usr/share/glib-2.0/schemas is in files.list. diff -r 5c6b015d6d66 -r 5944a15e6130 tazpkg --- a/tazpkg Tue Mar 06 16:57:12 2012 +0100 +++ b/tazpkg Wed Mar 07 11:05:18 2012 -0500 @@ -629,6 +629,10 @@ if [ "$(fgrep /usr/share/mime $ROOT$INSTALLED/$PACKAGE/files.list)" ]; then updatemimedb=yes fi + # Update-icon-database + if [ "$(fgrep /usr/share/icon/hicolor $ROOT$INSTALLED/$PACKAGE/files.list)" ]; then + updateicondb=yes + fi # Compile glib schemas if needed. if [ "$(fgrep /usr/share/glib-2.0/schemas $ROOT$INSTALLED/$PACKAGE/files.list)" ]; then compile_schemas=yes @@ -1388,6 +1392,13 @@ fi } +update_icon_database() +{ + if [ -f $1/usr/bin/gtk-update-icon-cache ] && [ -n "$updateicondb" ]; then + $1/usr/bin/gtk-update-icon-cache $1/usr/share/icons/hicolor + fi +} + compile_glib_schemas() { if [ -f $1/usr/bin/glib-compile-schemas ] && [ -n "$compile_schemas" ]; then @@ -1804,7 +1815,9 @@ fi install_package $ROOT update_desktop_database $ROOT - update_mime_database $ROOT ;; + update_mime_database $ROOT + update_icon_database $ROOT + compile_glib_schemas $ROOT ;; install-list|get-install-list) # Install a set of packages from a list. check_root