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: [EMAIL PROTECTED] Weblog: http://planet.gentoo.org/developers/leio
signature.asc
Description: This is a digitally signed message part