Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189324 - sys-apps/portage doesn't generate/update it's bytecode
Summary: sys-apps/portage doesn't generate/update it's bytecode
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-08-18 09:02 UTC by Tiziano Müller (RETIRED)
Modified: 2010-09-13 17:29 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 Tiziano Müller (RETIRED) gentoo-dev 2007-08-18 09:02:15 UTC
If you don't use the python or distutils eclass you should call /usr/$(get_libdir)/python${PYVER}/compileall.py yourself in pkg_postinst with the directory "/usr/lib/portage/pym/" as an argument to generate/update the bytecode.

Not doing this results in (currently ignored but still nasty) sandbox violation error messages when installing java-packages using paludis since python tries to rewrite the .pyc/.pyo in the forementioned directory while still being in the sandbox...
Comment 1 Zac Medico gentoo-dev 2007-08-18 09:34:40 UTC
I'll try that. It might be a little tricky with upgrades and downgrades to/from portage-2.2 since the module namespace has been rearranged. It works smoothly the way that it is now and I'm not sure how smooth it will be when I try what you suggest.
Comment 2 Zac Medico gentoo-dev 2007-08-24 02:21:18 UTC
I've updated portage-2.1.3.6.ebuild to remove existing bytecodes and then use py_compile.main() to compile only the source files that have just been installed. That avoids issues with portage.py <-> portage/__init__.py namespace changes and orphan bytecodes.