--- gnome2.eclass 2007-02-23 16:35:43.000000000 +0100 +++ gnome2.eclass 2007-04-07 13:26:38.000000000 +0200 @@ -106,29 +106,51 @@ rm -fr "${D}/usr/share/applications/mimeinfo.cache" } +gnome2_pkg_preinst() { + pushd "${D}" 1>/dev/null + #export GNOME2_SCHEMAS=etc/gconf/schemas/*schemas + if [[ -d "${D}"/usr/share/icons/ ]]; then + mkdir -p "${D}"/usr/share/gnome2-eclass/ + touch "${D}"/usr/share/gnome2-eclass/${PF}.icons + echo "touched" + fi + popd 1>/dev/null +} + gnome2_pkg_postinst() { gnome2_gconf_install fdo-mime_desktop_database_update fdo-mime_mime_database_update - gnome2_icon_cache_update + + if [[ -f "${ROOT}"/usr/share/gnome2-eclass/${PF}.icons ]] ; then + gnome2_icon_cache_update + fi if [[ "${SCROLLKEEPER_UPDATE}" = "1" ]]; then gnome2_scrollkeeper_update fi } -#gnome2_pkg_prerm() { +gnome2_pkg_prerm() { # gnome2_gconf_uninstall -#} + + if [[ -f "${ROOT}"/usr/share/gnome2-eclass/${PF}.icons ]] ; then + export RUN_ICON_CACHE_UPDATE="1" + fi + +} gnome2_pkg_postrm() { fdo-mime_desktop_database_update fdo-mime_mime_database_update - gnome2_icon_cache_update + + if [[ "${RUN_ICON_CACHE_UPDATE}" == "1" ]]; then + gnome2_icon_cache_update + fi if [[ "${SCROLLKEEPER_UPDATE}" = "1" ]]; then gnome2_scrollkeeper_update fi } -EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm +EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm --- gnome2-utils.eclass 2007-01-24 19:35:48.000000000 +0100 +++ gnome2-utils.eclass 2007-04-07 12:21:13.000000000 +0200 @@ -94,13 +94,6 @@ return fi - if ! grep -q "obj /usr/share/icons" ${ROOT}var/db/pkg/*/${PF}/CONTENTS - then - debug-print "No items to update" - - return - fi - ebegin "Updating icons cache" local retval=0