1 |
eva 12/05/02 21:05:38 |
2 |
|
3 |
Modified: gnome2.eclass gnome2-utils.eclass ChangeLog |
4 |
Log: |
5 |
Rewrite scrollkeeper support as proposed in bug #301311. |
6 |
|
7 |
Revision Changes Path |
8 |
1.105 eclass/gnome2.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2.eclass?rev=1.105&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2.eclass?rev=1.105&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2.eclass?r1=1.104&r2=1.105 |
13 |
|
14 |
Index: gnome2.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v |
17 |
retrieving revision 1.104 |
18 |
retrieving revision 1.105 |
19 |
diff -u -r1.104 -r1.105 |
20 |
--- gnome2.eclass 14 Dec 2011 19:47:54 -0000 1.104 |
21 |
+++ gnome2.eclass 2 May 2012 21:05:38 -0000 1.105 |
22 |
@@ -1,6 +1,6 @@ |
23 |
-# Copyright 1999-2011 Gentoo Foundation |
24 |
+# Copyright 1999-2012 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.104 2011/12/14 19:47:54 tetromino Exp $ |
27 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.105 2012/05/02 21:05:38 eva Exp $ |
28 |
|
29 |
# @ECLASS: gnome2.eclass |
30 |
# @MAINTAINER: |
31 |
@@ -125,6 +125,11 @@ |
32 |
G2CONF="${G2CONF} --disable-maintainer-mode" |
33 |
fi |
34 |
|
35 |
+ # Pass --disable-scrollkeeper when possible |
36 |
+ if grep -q "disable-scrollkeeper" configure; then |
37 |
+ G2CONF="${G2CONF} --disable-scrollkeeper" |
38 |
+ fi |
39 |
+ |
40 |
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659) |
41 |
addwrite "$(unset HOME; echo ~)/.gnome2" |
42 |
|
43 |
@@ -172,10 +177,9 @@ |
44 |
# 1. The scrollkeeper database is regenerated at pkg_postinst() |
45 |
# 2. ${ED}/var/lib/scrollkeeper contains only indexes for the current pkg |
46 |
# thus it makes no sense if pkg_postinst ISN'T run for some reason. |
47 |
- if [[ -z "$(find "${D}" -name '*.omf')" ]]; then |
48 |
- export SCROLLKEEPER_UPDATE="0" |
49 |
- fi |
50 |
rm -rf "${ED}${sk_tmp_dir}" |
51 |
+ rmdir "${ED}/var/lib" 2>/dev/null |
52 |
+ rmdir "${ED}/var" 2>/dev/null |
53 |
|
54 |
# Make sure this one doesn't get in the portage db |
55 |
rm -fr "${ED}/usr/share/applications/mimeinfo.cache" |
56 |
@@ -197,6 +201,7 @@ |
57 |
gnome2_gconf_savelist |
58 |
gnome2_icon_savelist |
59 |
gnome2_schemas_savelist |
60 |
+ gnome2_scrollkeeper_savelist |
61 |
} |
62 |
|
63 |
# @FUNCTION: gnome2_pkg_postinst |
64 |
@@ -209,10 +214,7 @@ |
65 |
fdo-mime_mime_database_update |
66 |
gnome2_icon_cache_update |
67 |
gnome2_schemas_update |
68 |
- |
69 |
- if [[ "${SCROLLKEEPER_UPDATE}" = "1" ]]; then |
70 |
- gnome2_scrollkeeper_update |
71 |
- fi |
72 |
+ gnome2_scrollkeeper_update |
73 |
} |
74 |
|
75 |
# @#FUNCTION: gnome2_pkg_prerm |
76 |
@@ -230,8 +232,5 @@ |
77 |
fdo-mime_mime_database_update |
78 |
gnome2_icon_cache_update |
79 |
gnome2_schemas_update |
80 |
- |
81 |
- if [[ "${SCROLLKEEPER_UPDATE}" = "1" ]]; then |
82 |
- gnome2_scrollkeeper_update |
83 |
- fi |
84 |
+ gnome2_scrollkeeper_update |
85 |
} |
86 |
|
87 |
|
88 |
|
89 |
1.27 eclass/gnome2-utils.eclass |
90 |
|
91 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2-utils.eclass?rev=1.27&view=markup |
92 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2-utils.eclass?rev=1.27&content-type=text/plain |
93 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2-utils.eclass?r1=1.26&r2=1.27 |
94 |
|
95 |
Index: gnome2-utils.eclass |
96 |
=================================================================== |
97 |
RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v |
98 |
retrieving revision 1.26 |
99 |
retrieving revision 1.27 |
100 |
diff -u -r1.26 -r1.27 |
101 |
--- gnome2-utils.eclass 8 Apr 2012 02:29:44 -0000 1.26 |
102 |
+++ gnome2-utils.eclass 2 May 2012 21:05:38 -0000 1.27 |
103 |
@@ -1,6 +1,6 @@ |
104 |
# Copyright 1999-2012 Gentoo Foundation |
105 |
# Distributed under the terms of the GNU General Public License v2 |
106 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.26 2012/04/08 02:29:44 tetromino Exp $ |
107 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.27 2012/05/02 21:05:38 eva Exp $ |
108 |
|
109 |
# @ECLASS: gnome2-utils.eclass |
110 |
# @MAINTAINER: |
111 |
@@ -62,13 +62,18 @@ |
112 |
# @DESCRIPTION: |
113 |
# List of icons provided by the package |
114 |
|
115 |
+# @ECLASS-VARIABLE: GNOME2_ECLASS_SCROLLS |
116 |
+# @INTERNAL |
117 |
+# @DEFAULT_UNSET |
118 |
+# @DESCRIPTION: |
119 |
+# List of scrolls (documentation files) provided by the package |
120 |
+ |
121 |
# @ECLASS-VARIABLE: GNOME2_ECLASS_GLIB_SCHEMAS |
122 |
# @INTERNAL |
123 |
# @DEFAULT_UNSET |
124 |
# @DESCRIPTION: |
125 |
# List of GSettings schemas provided by the package |
126 |
|
127 |
- |
128 |
DEPEND=">=sys-apps/sed-4" |
129 |
|
130 |
|
131 |
@@ -274,10 +279,14 @@ |
132 |
omf_makefiles="${omf_makefiles} ${S}/omf.make" |
133 |
fi |
134 |
|
135 |
+ if [[ -f ${S}/gnome-doc-utils.make ]] ; then |
136 |
+ omf_makefiles="${omf_makefiles} ${S}/gnome-doc-utils.make" |
137 |
+ fi |
138 |
+ |
139 |
# testing fixing of all makefiles found |
140 |
# The sort is important to ensure .am is listed before the respective .in for |
141 |
# maintainer mode regeneration not kicking in due to .am being newer than .in |
142 |
- for filename in $(find ./ -name "Makefile.in" -o -name "Makefile.am" |sort) ; do |
143 |
+ for filename in $(find "${S}" -name "Makefile.in" -o -name "Makefile.am" |sort) ; do |
144 |
omf_makefiles="${omf_makefiles} ${filename}" |
145 |
done |
146 |
|
147 |
@@ -287,12 +296,10 @@ |
148 |
local fails=( ) |
149 |
|
150 |
for omf in ${omf_makefiles} ; do |
151 |
- local rv=0 |
152 |
- |
153 |
sed -i -e 's:scrollkeeper-update:true:' "${omf}" |
154 |
retval=$? |
155 |
|
156 |
- if [[ ! $rv -eq 0 ]] ; then |
157 |
+ if [[ $retval -ne 0 ]] ; then |
158 |
debug-print "updating of ${omf} failed" |
159 |
|
160 |
# Add to the list of failures |
161 |
@@ -309,16 +316,39 @@ |
162 |
done |
163 |
} |
164 |
|
165 |
+# @FUNCTION: gnome2_scrollkeeper_savelist |
166 |
+# @DESCRIPTION: |
167 |
+# Find the scrolls that are about to be installed and save their location |
168 |
+# in the GNOME2_ECLASS_SCROLLS environment variable. |
169 |
+# This function should be called from pkg_preinst. |
170 |
+gnome2_scrollkeeper_savelist() { |
171 |
+ has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" |
172 |
+ pushd "${ED}" &> /dev/null |
173 |
+ export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null) |
174 |
+ popd &> /dev/null |
175 |
+} |
176 |
+ |
177 |
# @FUNCTION: gnome2_scrollkeeper_update |
178 |
# @DESCRIPTION: |
179 |
# Updates the global scrollkeeper database. |
180 |
# This function should be called from pkg_postinst and pkg_postrm. |
181 |
gnome2_scrollkeeper_update() { |
182 |
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}" |
183 |
- if [[ -x "${EROOT}${SCROLLKEEPER_UPDATE_BIN}" ]]; then |
184 |
- einfo "Updating scrollkeeper database ..." |
185 |
- "${EROOT}${SCROLLKEEPER_UPDATE_BIN}" -q -p "${EROOT}${SCROLLKEEPER_DIR}" |
186 |
+ local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}" |
187 |
+ |
188 |
+ if [[ ! -x "${updater}" ]] ; then |
189 |
+ debug-print "${updater} is not executable" |
190 |
+ return |
191 |
+ fi |
192 |
+ |
193 |
+ if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then |
194 |
+ debug-print "No scroll cache to update" |
195 |
+ return |
196 |
fi |
197 |
+ |
198 |
+ ebegin "Updating scrollkeeper database ..." |
199 |
+ "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}" |
200 |
+ eend $? |
201 |
} |
202 |
|
203 |
# @FUNCTION: gnome2_schemas_savelist |
204 |
|
205 |
|
206 |
|
207 |
1.233 eclass/ChangeLog |
208 |
|
209 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.233&view=markup |
210 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.233&content-type=text/plain |
211 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.232&r2=1.233 |
212 |
|
213 |
Index: ChangeLog |
214 |
=================================================================== |
215 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
216 |
retrieving revision 1.232 |
217 |
retrieving revision 1.233 |
218 |
diff -u -r1.232 -r1.233 |
219 |
--- ChangeLog 2 May 2012 18:31:42 -0000 1.232 |
220 |
+++ ChangeLog 2 May 2012 21:05:38 -0000 1.233 |
221 |
@@ -1,6 +1,10 @@ |
222 |
# ChangeLog for eclass directory |
223 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
224 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.232 2012/05/02 18:31:42 jdhore Exp $ |
225 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.233 2012/05/02 21:05:38 eva Exp $ |
226 |
+ |
227 |
+ 02 May 2012; Gilles Dartiguelongue <eva@g.o> gnome2-utils.eclass, |
228 |
+ gnome2.eclass: |
229 |
+ Rewrite scrollkeeper support as proposed in bug #301311. |
230 |
|
231 |
02 May 2012; Jeff Horelick <jdhore@g.o> clutter.eclass, |
232 |
gkrellm-plugin.eclass, gnome-python-common.eclass, go-mono.eclass, |