Just updated portage to 2.0.49-r15. Then, when I run emerge it can't import the "output" module. Reproducible: Always Steps to Reproduce: 1. allow unstable packages. 2. emerge -uv portage 3. emerge -upDv world Actual Results: bash-2.05b# emerge -upDv world Traceback (most recent call last): File "/usr/bin/emerge", line 10, in ? import emergehelp,xpak,string,re,commands,time,shutil,traceback,atexit,signal File "/usr/lib/portage/bin/emergehelp.py", line 7, in ? from output import * ImportError: No module named output Expected Results: Should have listed available packages to update. emerge --info not working. Get same Python traceback as above.
I know what caused the failure: After updating portage (which also updated to latest python-2.2.3), the python ebuild linked /usr/bin/python2.3 to /usr/bin/python. Therefore, emerge was run using python2.3 instead of python2.2. This meant that the output module wasn't available. Fix: ln -snf /usr/bin/python2.2 /usr/bin/python ln -snf /usr/bin/python2.2 /usr/bin/python2 However, it seems the python ebuild should be checked for why it sets python to 2.3.
If you want to use python-2.3 you have to use portage-2.0.49-r12, -r14 or -r16 BEFORE you update python (it's still masked for a reason).
Marius, I didn't WANT to use python 2.3. I had downloaded python 2.3 from python.org and built it myself. But I didn't replace python 2.2. What I'm saying is that the python 2.2 ebuild saw that the python 2.3 was on the system and relinked /usr/bin/python to python 2.3! I think this may be a bug in the python ebuild.
Well, you should've mentioned that in your report. Re-assinging to the python people.
well, if you replace your python without using the packages in portage (which are p.masked) then it is your responsibility. since portage -r10 or -r12 of portage, all python modules are in /usr/lib/portage/pym and emerge should have added /usr/lib/portage/pym to sys.path, so it should of found output.py. the python ebuild now looks for the latest version of python and links it to /usr/bin/python. that is expected behaviour.
Re: Alastair's comments: 1. "if you replace your python without using the packages in portage (which are p.masked) then it is your responsibility." I didn't REPLACE my python. I simply "altinstalled" python. This gave me a python2.3, but my links were still to python2.2. How should I test python2.3 so as not to cause the python ebuild to change the links? Should this behavior be documented? 2. "since portage -r10 or -r12 of portage, all python modules are in /usr/lib/portage/pym" Strange, since my system doesn't have that directory, and I just installed portage-2.0.49-r15 this morning! 3. "and emerge should have added /usr/lib/portage/pym to sys.path, so it should of found output.py." emerge DOES add /usr/lib/portage/pym to sys.path, but my system doesn't have that directory. If it did, I wouldn't have had the import failure! 4. "the python ebuild now looks for the latest version of python and links it to /usr/bin/python. that is expected behaviour." OK, but I suggest you document this. Also, I suggest you document how to test python 2.3 while it is masked. Thanks.