Index: gnome2.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v retrieving revision 1.75 diff -u -b -B -r1.75 gnome2.eclass --- gnome2.eclass 31 Oct 2006 17:08:44 -0000 1.75 +++ gnome2.eclass 23 Nov 2006 09:53:05 -0000 @@ -110,13 +110,9 @@ einfo "Installing GNOME 2 GConf schemas" - local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS" - - for F in $(grep "^obj /etc/gconf/schemas/.\+\.schemas\b" ${contents} | gawk '{print $2}' ); do - if [[ -e "${F}" ]]; then - # echo "DEBUG::gconf install ${F}" - ${GCONFTOOL_BIN} --makefile-install-rule ${F} 1>/dev/null - fi + for F in ${GNOME2_SCHEMAS}; do + [[ -e "/${F}" ]] || continue + ${GCONFTOOL_BIN} --makefile-install-rule "/${F}" 1>/dev/null done # have gconf reload the new schemas @@ -134,11 +130,9 @@ einfo "Uninstalling GNOME 2 GConf schemas" - local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS" - - for F in $(grep "obj /etc/gconf/schemas" ${contents} | sed 's:obj \([^ ]*\) .*:\1:' ); do - # echo "DEBUG::gconf install ${F}" - ${GCONFTOOL_BIN} --makefile-uninstall-rule ${F} 1>/dev/null + for F in ${GNOME2_SCHEMAS}; do + [[ -e "/${F}" ]] || continue + ${GCONFTOOL_BIN} --makefile-uninstall-rule "/${F}" 1>/dev/null done fi } @@ -157,8 +151,7 @@ return fi - if ! grep -q "obj /usr/share/icons" ${ROOT}/var/db/pkg/*/${PF}/CONTENTS - then + if [[ -n "${GNOME2_HAS_ICONS}" ]] ; then debug-print "No items to update" # We are done successfully @@ -274,6 +267,13 @@ fi } +gnome2_pkg_preinst() { + pushd "${D}" 1>/dev/null + export GNOME2_SCHEMAS=etc/gconf/schemas/*schemas + [[ -d "${D}"/usr/share/icons/ ]] && export GNOME2_HAS_ICONS="yes" + popd 1>/dev/null +} + gnome2_pkg_postinst() { gnome2_gconf_install gnome2_scrollkeeper_update @@ -293,4 +293,4 @@ gnome2_icon_cache_update } -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_postrm