Summary: | Extend app-admin/python-updater to detect leftovers from python.eclass | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Leonardo Boshell (RETIRED) <leonardop> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | pacho |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | python-updater-leftover_compiled_files.patch |
Description
Leonardo Boshell (RETIRED)
2007-09-13 05:26:47 UTC
Created attachment 130785 [details, diff]
python-updater-leftover_compiled_files.patch
I don't see why this should be a problem of python_mod_{compile,optimize}, because nearly all python-modules call those functions (through the distutils eclass) they obviously work. And for the leftover .py files we have python_mod_cleanup, so I'd suppose look for a reason why there are left over .pyc files. (In reply to comment #2) > I don't see why this should be a problem of python_mod_{compile,optimize}, I'm not sure what you understand by the "problem" here, but it seems it's not the same thing I tried to describe. The python_mod_{compile|optimize|cleanup} functions are fine, the ebuilds that use them are fine as well. The problem is that after upgrading python on a system, our recommendation is for users to run python-updater to keep the system sane, but one problem that python-updater doesn't handle is that some packages install .py[co] files (using the eclass, and not necessarily under /usr/lib*/python*) which are left broken after a python upgrade. gnome-doc-utils is one package that does this, for example. Then, I guess by some auto-magic process handled by python, when a module is imported, the .pyc files are re-generated if they are from an old python and the corresponding .py is found. This can happen when emerge is installing a package that depends on another package that hasn't been cleaned by python-updater. For example many gnome packages depend on gnome-doc-utils and users ofter run into this scenario, where emerge fails because of an access violation (python tries to re-generate the .pyc files on the root filesystem). Please let me know if I'm not making myself clear, or if there's a better solution than extending python-updater to prevent the access violations. Thanks. I don't understand how pyc files would be left behind here, unless the ebuild fails to run python_mod_cleanup. If the ebuild installs python modules without calling python_mod_optimize, that should be fixed in the ebuild. |