Gentoo Archives: gentoo-commits

From: "Sebastian Pipping (sping)" <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/python: python-2.7.1.ebuild python-3.1.2-r4.ebuild python-2.5.4-r4.ebuild python-2.6.6-r1.ebuild ChangeLog python-2.6.5-r3.ebuild python-2.4.6.ebuild python-2.7.ebuild python-3.1.3.ebuild
Date: Wed, 01 Dec 2010 19:53:41
Message-Id: 20101201195320.DEA3120054@flycatcher.gentoo.org
1 sping 10/12/01 19:53:20
2
3 Modified: python-2.7.1.ebuild python-3.1.2-r4.ebuild
4 python-2.5.4-r4.ebuild python-2.6.6-r1.ebuild
5 ChangeLog python-2.6.5-r3.ebuild
6 python-2.4.6.ebuild python-2.7.ebuild
7 python-3.1.3.ebuild
8 Log:
9 dev-lang/python: Repair, hopefully
10
11 (Portage version: 2.1.9.25/cvs/Linux x86_64)
12
13 Revision Changes Path
14 1.3 dev-lang/python/python-2.7.1.ebuild
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.1.ebuild?rev=1.3&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.1.ebuild?rev=1.3&content-type=text/plain
18 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.1.ebuild?r1=1.2&r2=1.3
19
20 Index: python-2.7.1.ebuild
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.1.ebuild,v
23 retrieving revision 1.2
24 retrieving revision 1.3
25 diff -u -r1.2 -r1.3
26 --- python-2.7.1.ebuild 29 Nov 2010 11:40:45 -0000 1.2
27 +++ python-2.7.1.ebuild 1 Dec 2010 19:53:20 -0000 1.3
28 @@ -1,6 +1,6 @@
29 # Copyright 1999-2010 Gentoo Foundation
30 # Distributed under the terms of the GNU General Public License v2
31 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.1.ebuild,v 1.2 2010/11/29 11:40:45 sping Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.1.ebuild,v 1.3 2010/12/01 19:53:20 sping Exp $
33
34 EAPI="2"
35 WANT_AUTOMAKE="none"
36 @@ -331,13 +331,49 @@
37 rmdir "${ED}$(python_get_libdir)/test/data"
38 }
39
40 +save_active_python_version() {
41 + active_python_2=$(eselect python show --python2)
42 + active_python_3=$(eselect python show --python3)
43 + active_python_main=$(eselect python show)
44 +}
45 +
46 +restore_active_python_version() {
47 + if [[ -n "${active_python_2}" &&
48 + "${active_python_2}" != $(eselect python show --python2) ]] ; then
49 + einfo "Restoring active Python 2.x interpreter: ${active_python_2}"
50 + eselect python set --python2 "${active_python_2}"
51 + fi
52 + if [[ -n "${active_python_3}" &&
53 + "${active_python_3}" != $(eselect python show --python3) ]] ; then
54 + einfo "Restoring active Python 3.x interpreter: ${active_python_3}"
55 + eselect python set --python3 "${active_python_3}"
56 + fi
57 +
58 + if [[ -n "${active_python_main}" &&
59 + "${active_python_main}" != $(eselect python show) ]] ; then
60 + einfo "Restoring main active Python interpreter: ${active_python_main}"
61 + eselect python set "${active_python_main}"
62 + fi
63 +}
64 +
65 +ensure_python_symlink() {
66 + if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
67 + eselect python update --python${PV%%.*}
68 + fi
69 +}
70 +
71 pkg_preinst() {
72 + save_active_python_version
73 +
74 if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then
75 python_updater_warning="1"
76 fi
77 }
78
79 pkg_postinst() {
80 + restore_active_python_version
81 + ensure_python_symlink
82 +
83 python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
84
85 if [[ "${python_updater_warning}" == "1" ]]; then
86 @@ -354,5 +390,7 @@
87 }
88
89 pkg_postrm() {
90 + ensure_python_symlink
91 +
92 python_mod_cleanup $(python_get_libdir)
93 }
94
95
96
97 1.11 dev-lang/python/python-3.1.2-r4.ebuild
98
99 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.1.2-r4.ebuild?rev=1.11&view=markup
100 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.1.2-r4.ebuild?rev=1.11&content-type=text/plain
101 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.1.2-r4.ebuild?r1=1.10&r2=1.11
102
103 Index: python-3.1.2-r4.ebuild
104 ===================================================================
105 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.2-r4.ebuild,v
106 retrieving revision 1.10
107 retrieving revision 1.11
108 diff -u -r1.10 -r1.11
109 --- python-3.1.2-r4.ebuild 27 Nov 2010 12:50:14 -0000 1.10
110 +++ python-3.1.2-r4.ebuild 1 Dec 2010 19:53:20 -0000 1.11
111 @@ -1,6 +1,6 @@
112 # Copyright 1999-2010 Gentoo Foundation
113 # Distributed under the terms of the GNU General Public License v2
114 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.2-r4.ebuild,v 1.10 2010/11/27 12:50:14 sping Exp $
115 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.2-r4.ebuild,v 1.11 2010/12/01 19:53:20 sping Exp $
116
117 EAPI="3"
118
119 @@ -268,13 +268,49 @@
120 newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
121 }
122
123 +save_active_python_version() {
124 + active_python_2=$(eselect python show --python2)
125 + active_python_3=$(eselect python show --python3)
126 + active_python_main=$(eselect python show)
127 +}
128 +
129 +restore_active_python_version() {
130 + if [[ -n "${active_python_2}" &&
131 + "${active_python_2}" != $(eselect python show --python2) ]] ; then
132 + einfo "Restoring active Python 2.x interpreter: ${active_python_2}"
133 + eselect python set --python2 "${active_python_2}"
134 + fi
135 + if [[ -n "${active_python_3}" &&
136 + "${active_python_3}" != $(eselect python show --python3) ]] ; then
137 + einfo "Restoring active Python 3.x interpreter: ${active_python_3}"
138 + eselect python set --python3 "${active_python_3}"
139 + fi
140 +
141 + if [[ -n "${active_python_main}" &&
142 + "${active_python_main}" != $(eselect python show) ]] ; then
143 + einfo "Restoring main active Python interpreter: ${active_python_main}"
144 + eselect python set "${active_python_main}"
145 + fi
146 +}
147 +
148 +ensure_python_symlink() {
149 + if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
150 + eselect python update --python${PV%%.*}
151 + fi
152 +}
153 +
154 pkg_preinst() {
155 + save_active_python_version
156 +
157 if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then
158 python_updater_warning="1"
159 fi
160 }
161
162 pkg_postinst() {
163 + restore_active_python_version
164 + ensure_python_symlink
165 +
166 python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
167
168 if [[ "$(eselect python show)" == "python2."* ]]; then
169 @@ -307,5 +343,7 @@
170 }
171
172 pkg_postrm() {
173 + ensure_python_symlink
174 +
175 python_mod_cleanup $(python_get_libdir)
176 }
177
178
179
180 1.25 dev-lang/python/python-2.5.4-r4.ebuild
181
182 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.5.4-r4.ebuild?rev=1.25&view=markup
183 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.5.4-r4.ebuild?rev=1.25&content-type=text/plain
184 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.5.4-r4.ebuild?r1=1.24&r2=1.25
185
186 Index: python-2.5.4-r4.ebuild
187 ===================================================================
188 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r4.ebuild,v
189 retrieving revision 1.24
190 retrieving revision 1.25
191 diff -u -r1.24 -r1.25
192 --- python-2.5.4-r4.ebuild 27 Nov 2010 12:50:14 -0000 1.24
193 +++ python-2.5.4-r4.ebuild 1 Dec 2010 19:53:20 -0000 1.25
194 @@ -1,6 +1,6 @@
195 # Copyright 1999-2010 Gentoo Foundation
196 # Distributed under the terms of the GNU General Public License v2
197 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r4.ebuild,v 1.24 2010/11/27 12:50:14 sping Exp $
198 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r4.ebuild,v 1.25 2010/12/01 19:53:20 sping Exp $
199
200 EAPI="1"
201
202 @@ -278,13 +278,49 @@
203 newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
204 }
205
206 +save_active_python_version() {
207 + active_python_2=$(eselect python show --python2)
208 + active_python_3=$(eselect python show --python3)
209 + active_python_main=$(eselect python show)
210 +}
211 +
212 +restore_active_python_version() {
213 + if [[ -n "${active_python_2}" &&
214 + "${active_python_2}" != $(eselect python show --python2) ]] ; then
215 + einfo "Restoring active Python 2.x interpreter: ${active_python_2}"
216 + eselect python set --python2 "${active_python_2}"
217 + fi
218 + if [[ -n "${active_python_3}" &&
219 + "${active_python_3}" != $(eselect python show --python3) ]] ; then
220 + einfo "Restoring active Python 3.x interpreter: ${active_python_3}"
221 + eselect python set --python3 "${active_python_3}"
222 + fi
223 +
224 + if [[ -n "${active_python_main}" &&
225 + "${active_python_main}" != $(eselect python show) ]] ; then
226 + einfo "Restoring main active Python interpreter: ${active_python_main}"
227 + eselect python set "${active_python_main}"
228 + fi
229 +}
230 +
231 +ensure_python_symlink() {
232 + if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
233 + eselect python update --python${PV%%.*}
234 + fi
235 +}
236 +
237 pkg_preinst() {
238 + save_active_python_version
239 +
240 if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.5" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then
241 python_updater_warning="1"
242 fi
243 }
244
245 pkg_postinst() {
246 + restore_active_python_version
247 + ensure_python_symlink
248 +
249 python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
250
251 if [[ "${python_updater_warning}" == "1" ]]; then
252 @@ -301,5 +337,7 @@
253 }
254
255 pkg_postrm() {
256 + ensure_python_symlink
257 +
258 python_mod_cleanup $(python_get_libdir)
259 }
260
261
262
263 1.5 dev-lang/python/python-2.6.6-r1.ebuild
264
265 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.6.6-r1.ebuild?rev=1.5&view=markup
266 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.6.6-r1.ebuild?rev=1.5&content-type=text/plain
267 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.6.6-r1.ebuild?r1=1.4&r2=1.5
268
269 Index: python-2.6.6-r1.ebuild
270 ===================================================================
271 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.6-r1.ebuild,v
272 retrieving revision 1.4
273 retrieving revision 1.5
274 diff -u -r1.4 -r1.5
275 --- python-2.6.6-r1.ebuild 27 Nov 2010 12:50:14 -0000 1.4
276 +++ python-2.6.6-r1.ebuild 1 Dec 2010 19:53:20 -0000 1.5
277 @@ -1,6 +1,6 @@
278 # Copyright 1999-2010 Gentoo Foundation
279 # Distributed under the terms of the GNU General Public License v2
280 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.6-r1.ebuild,v 1.4 2010/11/27 12:50:14 sping Exp $
281 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.6-r1.ebuild,v 1.5 2010/12/01 19:53:20 sping Exp $
282
283 EAPI="2"
284
285 @@ -272,13 +272,49 @@
286 rmdir "${ED}$(python_get_libdir)/lib-old"
287 }
288
289 +save_active_python_version() {
290 + active_python_2=$(eselect python show --python2)
291 + active_python_3=$(eselect python show --python3)
292 + active_python_main=$(eselect python show)
293 +}
294 +
295 +restore_active_python_version() {
296 + if [[ -n "${active_python_2}" &&
297 + "${active_python_2}" != $(eselect python show --python2) ]] ; then
298 + einfo "Restoring active Python 2.x interpreter: ${active_python_2}"
299 + eselect python set --python2 "${active_python_2}"
300 + fi
301 + if [[ -n "${active_python_3}" &&
302 + "${active_python_3}" != $(eselect python show --python3) ]] ; then
303 + einfo "Restoring active Python 3.x interpreter: ${active_python_3}"
304 + eselect python set --python3 "${active_python_3}"
305 + fi
306 +
307 + if [[ -n "${active_python_main}" &&
308 + "${active_python_main}" != $(eselect python show) ]] ; then
309 + einfo "Restoring main active Python interpreter: ${active_python_main}"
310 + eselect python set "${active_python_main}"
311 + fi
312 +}
313 +
314 +ensure_python_symlink() {
315 + if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
316 + eselect python update --python${PV%%.*}
317 + fi
318 +}
319 +
320 pkg_preinst() {
321 + save_active_python_version
322 +
323 if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then
324 python_updater_warning="1"
325 fi
326 }
327
328 pkg_postinst() {
329 + restore_active_python_version
330 + ensure_python_symlink
331 +
332 python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
333
334 if [[ "${python_updater_warning}" == "1" ]]; then
335 @@ -295,5 +331,7 @@
336 }
337
338 pkg_postrm() {
339 + ensure_python_symlink
340 +
341 python_mod_cleanup $(python_get_libdir)
342 }
343
344
345
346 1.504 dev-lang/python/ChangeLog
347
348 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.504&view=markup
349 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.504&content-type=text/plain
350 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.503&r2=1.504
351
352 Index: ChangeLog
353 ===================================================================
354 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v
355 retrieving revision 1.503
356 retrieving revision 1.504
357 diff -u -r1.503 -r1.504
358 --- ChangeLog 29 Nov 2010 11:40:45 -0000 1.503
359 +++ ChangeLog 1 Dec 2010 19:53:20 -0000 1.504
360 @@ -1,6 +1,12 @@
361 # ChangeLog for dev-lang/python
362 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
363 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.503 2010/11/29 11:40:45 sping Exp $
364 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.504 2010/12/01 19:53:20 sping Exp $
365 +
366 + 01 Dec 2010; <sping@g.o> python-2.4.6.ebuild, python-2.5.4-r4.ebuild,
367 + python-2.6.5-r3.ebuild, python-2.6.6-r1.ebuild, python-2.7.ebuild,
368 + python-2.7.1.ebuild, python-3.1.2-r4.ebuild, python-3.1.3.ebuild:
369 + Save/restore active Python version across calls to pkg_postrm() of the ebuild
370 + about to be replaced. Ensure /usr/bin/python symlink.
371
372 29 Nov 2010; <sping@g.o> python-2.7.1.ebuild, python-3.1.3.ebuild:
373 Remove eselect_python_update() from 2.7.1 and 3.1.3
374
375
376
377 1.10 dev-lang/python/python-2.6.5-r3.ebuild
378
379 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.6.5-r3.ebuild?rev=1.10&view=markup
380 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.6.5-r3.ebuild?rev=1.10&content-type=text/plain
381 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.6.5-r3.ebuild?r1=1.9&r2=1.10
382
383 Index: python-2.6.5-r3.ebuild
384 ===================================================================
385 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.5-r3.ebuild,v
386 retrieving revision 1.9
387 retrieving revision 1.10
388 diff -u -r1.9 -r1.10
389 --- python-2.6.5-r3.ebuild 27 Nov 2010 12:50:14 -0000 1.9
390 +++ python-2.6.5-r3.ebuild 1 Dec 2010 19:53:20 -0000 1.10
391 @@ -1,6 +1,6 @@
392 # Copyright 1999-2010 Gentoo Foundation
393 # Distributed under the terms of the GNU General Public License v2
394 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.5-r3.ebuild,v 1.9 2010/11/27 12:50:14 sping Exp $
395 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.5-r3.ebuild,v 1.10 2010/12/01 19:53:20 sping Exp $
396
397 EAPI="2"
398
399 @@ -270,13 +270,49 @@
400 rmdir "${ED}$(python_get_libdir)/lib-old"
401 }
402
403 +save_active_python_version() {
404 + active_python_2=$(eselect python show --python2)
405 + active_python_3=$(eselect python show --python3)
406 + active_python_main=$(eselect python show)
407 +}
408 +
409 +restore_active_python_version() {
410 + if [[ -n "${active_python_2}" &&
411 + "${active_python_2}" != $(eselect python show --python2) ]] ; then
412 + einfo "Restoring active Python 2.x interpreter: ${active_python_2}"
413 + eselect python set --python2 "${active_python_2}"
414 + fi
415 + if [[ -n "${active_python_3}" &&
416 + "${active_python_3}" != $(eselect python show --python3) ]] ; then
417 + einfo "Restoring active Python 3.x interpreter: ${active_python_3}"
418 + eselect python set --python3 "${active_python_3}"
419 + fi
420 +
421 + if [[ -n "${active_python_main}" &&
422 + "${active_python_main}" != $(eselect python show) ]] ; then
423 + einfo "Restoring main active Python interpreter: ${active_python_main}"
424 + eselect python set "${active_python_main}"
425 + fi
426 +}
427 +
428 +ensure_python_symlink() {
429 + if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
430 + eselect python update --python${PV%%.*}
431 + fi
432 +}
433 +
434 pkg_preinst() {
435 + save_active_python_version
436 +
437 if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then
438 python_updater_warning="1"
439 fi
440 }
441
442 pkg_postinst() {
443 + restore_active_python_version
444 + ensure_python_symlink
445 +
446 python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
447
448 if [[ "${python_updater_warning}" == "1" ]]; then
449 @@ -293,5 +329,7 @@
450 }
451
452 pkg_postrm() {
453 + ensure_python_symlink
454 +
455 python_mod_cleanup $(python_get_libdir)
456 }
457
458
459
460 1.43 dev-lang/python/python-2.4.6.ebuild
461
462 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.4.6.ebuild?rev=1.43&view=markup
463 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.4.6.ebuild?rev=1.43&content-type=text/plain
464 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.4.6.ebuild?r1=1.42&r2=1.43
465
466 Index: python-2.4.6.ebuild
467 ===================================================================
468 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.6.ebuild,v
469 retrieving revision 1.42
470 retrieving revision 1.43
471 diff -u -r1.42 -r1.43
472 --- python-2.4.6.ebuild 27 Nov 2010 12:50:14 -0000 1.42
473 +++ python-2.4.6.ebuild 1 Dec 2010 19:53:20 -0000 1.43
474 @@ -1,6 +1,6 @@
475 # Copyright 1999-2010 Gentoo Foundation
476 # Distributed under the terms of the GNU General Public License v2
477 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.6.ebuild,v 1.42 2010/11/27 12:50:14 sping Exp $
478 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.6.ebuild,v 1.43 2010/12/01 19:53:20 sping Exp $
479
480 EAPI="1"
481
482 @@ -263,13 +263,49 @@
483 newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
484 }
485
486 +save_active_python_version() {
487 + active_python_2=$(eselect python show --python2)
488 + active_python_3=$(eselect python show --python3)
489 + active_python_main=$(eselect python show)
490 +}
491 +
492 +restore_active_python_version() {
493 + if [[ -n "${active_python_2}" &&
494 + "${active_python_2}" != $(eselect python show --python2) ]] ; then
495 + einfo "Restoring active Python 2.x interpreter: ${active_python_2}"
496 + eselect python set --python2 "${active_python_2}"
497 + fi
498 + if [[ -n "${active_python_3}" &&
499 + "${active_python_3}" != $(eselect python show --python3) ]] ; then
500 + einfo "Restoring active Python 3.x interpreter: ${active_python_3}"
501 + eselect python set --python3 "${active_python_3}"
502 + fi
503 +
504 + if [[ -n "${active_python_main}" &&
505 + "${active_python_main}" != $(eselect python show) ]] ; then
506 + einfo "Restoring main active Python interpreter: ${active_python_main}"
507 + eselect python set "${active_python_main}"
508 + fi
509 +}
510 +
511 +ensure_python_symlink() {
512 + if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
513 + eselect python update --python${PV%%.*}
514 + fi
515 +}
516 +
517 pkg_preinst() {
518 + save_active_python_version
519 +
520 if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.4" && ! has_version "${CATEGORY}/${PN}:2.5" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then
521 python_updater_warning="1"
522 fi
523 }
524
525 pkg_postinst() {
526 + restore_active_python_version
527 + ensure_python_symlink
528 +
529 # Python 2.4 partially doesn't respect $(get_libdir).
530 python_mod_optimize -f -x "/(site-packages|test|tests)/" /usr/lib/python${SLOT}
531
532 @@ -287,6 +323,8 @@
533 }
534
535 pkg_postrm() {
536 + ensure_python_symlink
537 +
538 # Python 2.4 partially doesn't respect $(get_libdir).
539 python_mod_cleanup /usr/lib/python${SLOT}
540 }
541
542
543
544 1.6 dev-lang/python/python-2.7.ebuild
545
546 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.ebuild?rev=1.6&view=markup
547 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.ebuild?rev=1.6&content-type=text/plain
548 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.ebuild?r1=1.5&r2=1.6
549
550 Index: python-2.7.ebuild
551 ===================================================================
552 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.ebuild,v
553 retrieving revision 1.5
554 retrieving revision 1.6
555 diff -u -r1.5 -r1.6
556 --- python-2.7.ebuild 27 Nov 2010 12:50:14 -0000 1.5
557 +++ python-2.7.ebuild 1 Dec 2010 19:53:20 -0000 1.6
558 @@ -1,6 +1,6 @@
559 # Copyright 1999-2010 Gentoo Foundation
560 # Distributed under the terms of the GNU General Public License v2
561 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.ebuild,v 1.5 2010/11/27 12:50:14 sping Exp $
562 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.ebuild,v 1.6 2010/12/01 19:53:20 sping Exp $
563
564 EAPI="2"
565
566 @@ -284,13 +284,49 @@
567 rmdir "${ED}$(python_get_libdir)/test/data"
568 }
569
570 +save_active_python_version() {
571 + active_python_2=$(eselect python show --python2)
572 + active_python_3=$(eselect python show --python3)
573 + active_python_main=$(eselect python show)
574 +}
575 +
576 +restore_active_python_version() {
577 + if [[ -n "${active_python_2}" &&
578 + "${active_python_2}" != $(eselect python show --python2) ]] ; then
579 + einfo "Restoring active Python 2.x interpreter: ${active_python_2}"
580 + eselect python set --python2 "${active_python_2}"
581 + fi
582 + if [[ -n "${active_python_3}" &&
583 + "${active_python_3}" != $(eselect python show --python3) ]] ; then
584 + einfo "Restoring active Python 3.x interpreter: ${active_python_3}"
585 + eselect python set --python3 "${active_python_3}"
586 + fi
587 +
588 + if [[ -n "${active_python_main}" &&
589 + "${active_python_main}" != $(eselect python show) ]] ; then
590 + einfo "Restoring main active Python interpreter: ${active_python_main}"
591 + eselect python set "${active_python_main}"
592 + fi
593 +}
594 +
595 +ensure_python_symlink() {
596 + if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
597 + eselect python update --python${PV%%.*}
598 + fi
599 +}
600 +
601 pkg_preinst() {
602 + save_active_python_version
603 +
604 if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then
605 python_updater_warning="1"
606 fi
607 }
608
609 pkg_postinst() {
610 + restore_active_python_version
611 + ensure_python_symlink
612 +
613 python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
614
615 if [[ "${python_updater_warning}" == "1" ]]; then
616 @@ -307,5 +343,7 @@
617 }
618
619 pkg_postrm() {
620 + ensure_python_symlink
621 +
622 python_mod_cleanup $(python_get_libdir)
623 }
624
625
626
627 1.3 dev-lang/python/python-3.1.3.ebuild
628
629 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.1.3.ebuild?rev=1.3&view=markup
630 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.1.3.ebuild?rev=1.3&content-type=text/plain
631 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.1.3.ebuild?r1=1.2&r2=1.3
632
633 Index: python-3.1.3.ebuild
634 ===================================================================
635 RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.3.ebuild,v
636 retrieving revision 1.2
637 retrieving revision 1.3
638 diff -u -r1.2 -r1.3
639 --- python-3.1.3.ebuild 29 Nov 2010 11:40:45 -0000 1.2
640 +++ python-3.1.3.ebuild 1 Dec 2010 19:53:20 -0000 1.3
641 @@ -1,6 +1,6 @@
642 # Copyright 1999-2010 Gentoo Foundation
643 # Distributed under the terms of the GNU General Public License v2
644 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.3.ebuild,v 1.2 2010/11/29 11:40:45 sping Exp $
645 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.3.ebuild,v 1.3 2010/12/01 19:53:20 sping Exp $
646
647 EAPI="3"
648 WANT_AUTOMAKE="none"
649 @@ -302,13 +302,49 @@
650 newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
651 }
652
653 +save_active_python_version() {
654 + active_python_2=$(eselect python show --python2)
655 + active_python_3=$(eselect python show --python3)
656 + active_python_main=$(eselect python show)
657 +}
658 +
659 +restore_active_python_version() {
660 + if [[ -n "${active_python_2}" &&
661 + "${active_python_2}" != $(eselect python show --python2) ]] ; then
662 + einfo "Restoring active Python 2.x interpreter: ${active_python_2}"
663 + eselect python set --python2 "${active_python_2}"
664 + fi
665 + if [[ -n "${active_python_3}" &&
666 + "${active_python_3}" != $(eselect python show --python3) ]] ; then
667 + einfo "Restoring active Python 3.x interpreter: ${active_python_3}"
668 + eselect python set --python3 "${active_python_3}"
669 + fi
670 +
671 + if [[ -n "${active_python_main}" &&
672 + "${active_python_main}" != $(eselect python show) ]] ; then
673 + einfo "Restoring main active Python interpreter: ${active_python_main}"
674 + eselect python set "${active_python_main}"
675 + fi
676 +}
677 +
678 +ensure_python_symlink() {
679 + if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
680 + eselect python update --python${PV%%.*}
681 + fi
682 +}
683 +
684 pkg_preinst() {
685 + save_active_python_version
686 +
687 if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then
688 python_updater_warning="1"
689 fi
690 }
691
692 pkg_postinst() {
693 + restore_active_python_version
694 + ensure_python_symlink
695 +
696 python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
697
698 if [[ "$(eselect python show)" == "python2."* ]]; then
699 @@ -341,5 +377,7 @@
700 }
701
702 pkg_postrm() {
703 + ensure_python_symlink
704 +
705 python_mod_cleanup $(python_get_libdir)
706 }