Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 155993 | Differences between
and this patch

Collapse All | Expand All

(-)a/eclass/gnome2-utils.eclass (-8 / +37 lines)
Lines 28-33 DEPEND=">=sys-apps/sed-4" Link Here
28
28
29
29
30
30
31
# Find the GConf schemas that are about to be installed and save their location
32
# in the GNOME2_ECLASS_SCHEMAS environment variable
33
gnome2_gconf_savelist() {
34
	pushd "${D}" &> /dev/null
35
	export GNOME2_ECLASS_SCHEMAS=`find etc/gconf/schemas/ -name '*.schemas'`
36
	#echo "preinst: D=\"${D}\""
37
	#echo "preinst: GNOME2_ECLASS_SCHEMAS=\"${GNOME2_ECLASS_SCHEMAS}\""
38
	popd &> /dev/null
39
}
40
41
31
# Applies any schema files installed by the current ebuild to Gconf's database
42
# Applies any schema files installed by the current ebuild to Gconf's database
32
# using gconftool-2
43
# using gconftool-2
33
gnome2_gconf_install() {
44
gnome2_gconf_install() {
Lines 35-53 gnome2_gconf_install() { Link Here
35
		return
46
		return
36
	fi
47
	fi
37
48
49
	if [[ -z ${GNOME2_ECLASS_SCHEMAS} ]]; then
50
		einfo "No GNOME 2 GConf schemas found"
51
		return
52
	fi
53
38
	# We are ready to install the GCONF Scheme now
54
	# We are ready to install the GCONF Scheme now
39
	unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
55
	unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
40
	export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
56
	export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
41
57
42
	einfo "Installing GNOME 2 GConf schemas"
58
	einfo "Installing GNOME 2 GConf schemas"
43
59
44
	local contents="${ROOT}var/db/pkg/*/${PN}-${PVR}/CONTENTS"
45
	local F
60
	local F
46
61
47
	for F in $(grep "^obj /etc/gconf/schemas/.\+\.schemas\b" ${contents} | gawk '{print $2}' ); do
62
	for F in ${GNOME2_ECLASS_SCHEMAS}; do
48
		if [[ -e "${F}" ]]; then
63
		if [[ -e "${ROOT}${F}" ]]; then
49
			# echo "DEBUG::gconf install  ${F}"
64
			# echo "DEBUG::gconf install  ${F}"
50
			${GCONFTOOL_BIN} --makefile-install-rule ${F} 1>/dev/null
65
			${GCONFTOOL_BIN} --makefile-install-rule ${ROOT}${F} 1>/dev/null
51
		fi
66
		fi
52
	done
67
	done
53
68
Lines 68-85 gnome2_gconf_uninstall() { Link Here
68
		return
83
		return
69
	fi
84
	fi
70
85
86
	if [[ -z ${GNOME2_ECLASS_SCHEMAS} ]]; then
87
		einfo "No GNOME 2 GConf schemas found"
88
		return
89
	fi
90
71
	unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
91
	unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
72
	export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
92
	export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
73
93
74
	einfo "Uninstalling GNOME 2 GConf schemas"
94
	einfo "Uninstalling GNOME 2 GConf schemas"
75
95
76
	local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS"
77
	local F
96
	local F
78
97
79
	for F in $(grep "obj /etc/gconf/schemas" ${contents} | sed 's:obj \([^ ]*\) .*:\1:' ); do
98
	for F in ${GNOME2_ECLASS_SCHEMAS}; do
80
		# echo "DEBUG::gconf install  ${F}"
99
		if [[ -e "${ROOT}${F}" ]]; then
81
		${GCONFTOOL_BIN} --makefile-uninstall-rule ${F} 1>/dev/null
100
			# echo "DEBUG::gconf uninstall  ${F}"
101
			${GCONFTOOL_BIN} --makefile-uninstall-rule ${ROOT}${F} 1>/dev/null
102
		fi
82
	done
103
	done
104
105
	# have gconf reload the new schemas
106
	pids=$(pgrep -x gconfd-2)
107
	if [[ $? == 0 ]] ; then
108
		ebegin "Reloading GConf schemas"
109
		kill -HUP ${pids}
110
		eend $?
111
	fi
83
}
112
}
84
113
85
114
(-)a/eclass/gnome2.eclass (-4 / +8 lines)
Lines 106-111 gnome2_src_install() { Link Here
106
	rm -fr "${D}/usr/share/applications/mimeinfo.cache"
106
	rm -fr "${D}/usr/share/applications/mimeinfo.cache"
107
}
107
}
108
108
109
gnome2_pkg_preinst() {
110
	gnome2_gconf_savelist
111
}
112
109
gnome2_pkg_postinst() {
113
gnome2_pkg_postinst() {
110
	gnome2_gconf_install
114
	gnome2_gconf_install
111
	fdo-mime_desktop_database_update
115
	fdo-mime_desktop_database_update
Lines 117-125 gnome2_pkg_postinst() { Link Here
117
	fi
121
	fi
118
}
122
}
119
123
120
#gnome2_pkg_prerm() {
124
gnome2_pkg_prerm() {
121
#	gnome2_gconf_uninstall
125
	gnome2_gconf_uninstall
122
#}
126
}
123
127
124
gnome2_pkg_postrm() {
128
gnome2_pkg_postrm() {
125
	fdo-mime_desktop_database_update
129
	fdo-mime_desktop_database_update
Lines 131-134 gnome2_pkg_postrm() { Link Here
131
	fi
135
	fi
132
}
136
}
133
137
134
EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
138
EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm

Return to bug 155993