Gentoo Archives: gentoo-dev

From: Alistair Bush <ali_bush@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild
Date: Sun, 14 Oct 2007 01:47:03
Message-Id: 471170F8.1000209@gentoo.org
In Reply to: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/gnome-python-extras: ChangeLog gnome-python-extras-2.19.1-r1.ebuild by Donnie Berkholz
1 > On 13:25 Fri 12 Oct , Remi Cardona (remi) wrote:
2 >> 1.1 dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild
3 >>
4 >> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild?rev=1.1&view=markup
5 >> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/gnome-python-extras/gnome-python-extras-2.19.1-r1.ebuild?rev=1.1&content-type=text/plain
6 >
7 >> pkg_postinst() {
8 >> python_version
9 >> python_mod_optimize "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0"
10 >> }
11 >>
12 >> pkg_postrm() {
13 >> python_version
14 >> python_mod_cleanup "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0"
15 >> }
16
17 While you guys are on this subject, I thought I would put in the
18 experience I just had.
19
20 http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/java-config/java-config-2.1.2.ebuild?rev=1.1&view=markup
21
22 As you will note in the ebuild above I inherit distutils and then
23
24 declare
25
26 PYTHON_MODNAME="java_config_2"
27
28 and have my 2 functions as so....
29
30 pkg_postrm() {
31 distutils_python_version
32 distutils_pkg_postrm
33 }
34
35 pkg_postinst() {
36 distutils_pkg_postinst
37 ...
38 ...
39 }
40
41 Firstly it is interesting to note that you must call *python_version
42 before distutils_pkg_postrm while distutils_pkg_postinst handles this
43 itself.
44
45 Is this a good solution? Would it also be a good solution in your case?
46
47 PYTHON_MODNAME from my understanding what i've investigated will accept
48 a list of modules if you need it to.
49
50 Anyway, hopefully this helps.
51
52 Alistair.
53
54 ps. My python experience has not left the realm of java-config and I
55 have only done 2 releases, 1 1/2 of which I completely screwed up. I am
56 no expert and have no idea whether the above is correct, valid or
57 otherwise safe for human consumption. Don't complain!!
58 --
59 gentoo-dev@g.o mailing list

Replies