From: Mart Raudsepp <leio@gentoo.org>
To: gentoo-dev@lists.gentoo.org
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 20:14:46 +0300 [thread overview]
Message-ID: <1190913286.4788.12.camel@localhost> (raw)
In-Reply-To: <fdgk9c$9oe$2@sea.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]
On N, 2007-09-27 at 17:08 +0100, Steve Long wrote:
> Donnie Berkholz wrote:
>
> > On 13:15 Wed 26 Sep , Mart Raudsepp (leio) wrote:
> >> mv "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py \
> >> "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py-2.0
> >> mv "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth \
> >> "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth-2.0
> >> }
> >>
> >> pkg_postinst() {
> >> python_version
> >> python_mod_optimize /usr/lib/python${PYVER}/site-packages/gtk-2.0
> >> alternatives_auto_makesym
> >> /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py
> >> pygtk.py-[0-9].[0-9] alternatives_auto_makesym
> >> /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth
> >> pygtk.pth-[0-9].[0-9] python_mod_compile
> >> ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py
> >
> > This is pretty weird, because it uses get_libdir() almost everywhere but
> > skips it once. Wonder if we could add a repoman check that looks for
> > whether an ebuild calls get_libdir(), then checks for any instances of
> > '[^[:alnum:]]lib[^[:alnum:]]'.
> >
> It seems a bit inefficient to keep calling the function in an implicit
> subshell. What's wrong with ldir="/usr/$(get_libdir)/" [or "${ROOT}usr.."]
> once and then reusing the value?
Readability in my eyes. This function call can't cost more than all the
disk activity that is going to go on from the calls..
> (The single use of $ROOT in pkg_postinst() seems odd too, to this newb.)
That's what python.eclass gives you. Other functions takes care of
${ROOT} for you, but that doesn't.
As a side note, the python_mod_optimize lib was changed to a
$(get_libdir) yesterday based on Donnies initial post here.
--
Mart Raudsepp
Gentoo Developer
Mail: leio@gentoo.org
Weblog: http://planet.gentoo.org/developers/leio
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2007-09-27 17:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1IaWjJ-0006Ci-He@stork.gentoo.org>
2007-09-27 1:21 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-python/pygobject: ChangeLog pygobject-2.14.0.ebuild Donnie Berkholz
2007-09-27 2:16 ` Ryan Hill
2007-09-27 16:08 ` Steve Long
2007-09-27 17:14 ` Mart Raudsepp [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1190913286.4788.12.camel@localhost \
--to=leio@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox