View | Details | Raw Unified
Collapse All | Expand All

(-) a/eclass/gnome2-utils.eclass (-8 / +37 lines)
 Lines 28-33   DEPEND=">=sys-apps/sed-4" Link Here 
# Find the GConf schemas that are about to be installed and save their location
# in the GNOME2_ECLASS_SCHEMAS environment variable
gnome2_gconf_savelist() {
	pushd "${D}" &> /dev/null
	export GNOME2_ECLASS_SCHEMAS=`find etc/gconf/schemas/ -name '*.schemas'`
	#echo "preinst: D=\"${D}\""
	#echo "preinst: GNOME2_ECLASS_SCHEMAS=\"${GNOME2_ECLASS_SCHEMAS}\""
	popd &> /dev/null
}
# Applies any schema files installed by the current ebuild to Gconf's database
# Applies any schema files installed by the current ebuild to Gconf's database
# using gconftool-2
# using gconftool-2
gnome2_gconf_install() {
gnome2_gconf_install() {
 Lines 35-53   gnome2_gconf_install() { Link Here 
		return
		return
	fi
	fi
	if [[ -z ${GNOME2_ECLASS_SCHEMAS} ]]; then
		einfo "No GNOME 2 GConf schemas found"
		return
	fi
	# We are ready to install the GCONF Scheme now
	# We are ready to install the GCONF Scheme now
	unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
	unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
	export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
	export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
	einfo "Installing GNOME 2 GConf schemas"
	einfo "Installing GNOME 2 GConf schemas"
	local contents="${ROOT}var/db/pkg/*/${PN}-${PVR}/CONTENTS"
	local F
	local F
	for F in $(grep "^obj /etc/gconf/schemas/.\+\.schemas\b" ${contents} | gawk '{print $2}' ); do
	for F in ${GNOME2_ECLASS_SCHEMAS}; do
		if [[ -e "${F}" ]]; then
		if [[ -e "${ROOT}${F}" ]]; then
			# echo "DEBUG::gconf install  ${F}"
			# echo "DEBUG::gconf install  ${F}"
			${GCONFTOOL_BIN} --makefile-install-rule ${F} 1>/dev/null
			${GCONFTOOL_BIN} --makefile-install-rule ${ROOT}${F} 1>/dev/null
		fi
		fi
	done
	done
 Lines 68-85   gnome2_gconf_uninstall() { Link Here 
		return
		return
	fi
	fi
	if [[ -z ${GNOME2_ECLASS_SCHEMAS} ]]; then
		einfo "No GNOME 2 GConf schemas found"
		return
	fi
	unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
	unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
	export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
	export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
	einfo "Uninstalling GNOME 2 GConf schemas"
	einfo "Uninstalling GNOME 2 GConf schemas"
	local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS"
	local F
	local F
	for F in $(grep "obj /etc/gconf/schemas" ${contents} | sed 's:obj \([^ ]*\) .*:\1:' ); do
	for F in ${GNOME2_ECLASS_SCHEMAS}; do
		# echo "DEBUG::gconf install  ${F}"
		if [[ -e "${ROOT}${F}" ]]; then
		${GCONFTOOL_BIN} --makefile-uninstall-rule ${F} 1>/dev/null
			# echo "DEBUG::gconf uninstall  ${F}"
			${GCONFTOOL_BIN} --makefile-uninstall-rule ${ROOT}${F} 1>/dev/null
		fi
	done
	done
	# have gconf reload the new schemas
	pids=$(pgrep -x gconfd-2)
	if [[ $? == 0 ]] ; then
		ebegin "Reloading GConf schemas"
		kill -HUP ${pids}
		eend $?
	fi
}
}
(-) a/eclass/gnome2.eclass (-4 / +8 lines)
 Lines 106-111   gnome2_src_install() { Link Here 
	rm -fr "${D}/usr/share/applications/mimeinfo.cache"
	rm -fr "${D}/usr/share/applications/mimeinfo.cache"
}
}
gnome2_pkg_preinst() {
	gnome2_gconf_savelist
}
gnome2_pkg_postinst() {
gnome2_pkg_postinst() {
	gnome2_gconf_install
	gnome2_gconf_install
	fdo-mime_desktop_database_update
	fdo-mime_desktop_database_update
 Lines 117-125   gnome2_pkg_postinst() { Link Here 
	fi
	fi
}
}
#gnome2_pkg_prerm() {
gnome2_pkg_prerm() {
#	gnome2_gconf_uninstall
	gnome2_gconf_uninstall
#}
}
gnome2_pkg_postrm() {
gnome2_pkg_postrm() {
	fdo-mime_desktop_database_update
	fdo-mime_desktop_database_update
 Lines 131-134   gnome2_pkg_postrm() { Link Here 
	fi
	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