Gentoo Archives: gentoo-dev

From: Mart Raudsepp <leio@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/pygobject: ChangeLog pygobject-2.14.0.ebuild
Date: Thu, 27 Sep 2007 17:27:29
Message-Id: 1190913286.4788.12.camel@localhost
In Reply to: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/pygobject: ChangeLog pygobject-2.14.0.ebuild by Steve Long
1 On N, 2007-09-27 at 17:08 +0100, Steve Long wrote:
2 > Donnie Berkholz wrote:
3 >
4 > > On 13:15 Wed 26 Sep , Mart Raudsepp (leio) wrote:
5 > >> mv "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py \
6 > >> "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py-2.0
7 > >> mv "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth \
8 > >> "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth-2.0
9 > >> }
10 > >>
11 > >> pkg_postinst() {
12 > >> python_version
13 > >> python_mod_optimize /usr/lib/python${PYVER}/site-packages/gtk-2.0
14 > >> alternatives_auto_makesym
15 > >> /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py
16 > >> pygtk.py-[0-9].[0-9] alternatives_auto_makesym
17 > >> /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth
18 > >> pygtk.pth-[0-9].[0-9] python_mod_compile
19 > >> ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py
20 > >
21 > > This is pretty weird, because it uses get_libdir() almost everywhere but
22 > > skips it once. Wonder if we could add a repoman check that looks for
23 > > whether an ebuild calls get_libdir(), then checks for any instances of
24 > > '[^[:alnum:]]lib[^[:alnum:]]'.
25 > >
26 > It seems a bit inefficient to keep calling the function in an implicit
27 > subshell. What's wrong with ldir="/usr/$(get_libdir)/" [or "${ROOT}usr.."]
28 > once and then reusing the value?
29
30 Readability in my eyes. This function call can't cost more than all the
31 disk activity that is going to go on from the calls..
32
33 > (The single use of $ROOT in pkg_postinst() seems odd too, to this newb.)
34
35 That's what python.eclass gives you. Other functions takes care of
36 ${ROOT} for you, but that doesn't.
37
38
39 As a side note, the python_mod_optimize lib was changed to a
40 $(get_libdir) yesterday based on Donnies initial post here.
41
42 --
43 Mart Raudsepp
44 Gentoo Developer
45 Mail: leio@g.o
46 Weblog: http://planet.gentoo.org/developers/leio

Attachments

File name MIME type
signature.asc application/pgp-signature