Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288354 - dev-lang/python-{2.5.4-r3,2.6.3,3.1.1-r1}: attempts to bytecompile python modules in /usr/lib when $(get_libdir) != lib
Summary: dev-lang/python-{2.5.4-r3,2.6.3,3.1.1-r1}: attempts to bytecompile python mod...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-09 18:55 UTC by Jonathan Callen (RETIRED)
Modified: 2009-10-17 05:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Callen (RETIRED) gentoo-dev 2009-10-09 18:55:50 UTC
In pkg_postinst, the python ebuilds attempt to bytecompile the python modules in /usr/lib/python${PYVER} as well as in /usr/$(get_libdir)/python${PYVER}, which is incorrect when /usr/lib is not a symlink to /usr/$(get_libdir).

The suspect part of the ebuild reads, in part:

    python_mod_optimize -x "(site-packages|test)" /usr/lib/python${PYVER}
    [[ "$(get_libdir)" != "lib" ]] && python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER}

This causes the following output on postinst:

Switching to python2.6
 * //usr/lib/python2.6 doesn't exist!
 * Byte compiling python modules for python-2.6 .. ...  [ ok ]
 * Byte compiling python modules for python-2.6 .. ...  [ ok ]

(and similar for python3.1)

I would suggest just changing those two suspect lines in the ebuild to:

    python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER}
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-10-17 05:11:25 UTC
Fixed.
I also fixed paths passed to python_mod_cleanup().
dev-lang/python-2.4.6 installs .py files always to /usr/lib.