Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31755 - After updating to portage-2.0.49-r15, emerge fails importing output module
Summary: After updating to portage-2.0.49-r15, emerge fails importing output module
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-22 10:42 UTC by Howard B. Golden
Modified: 2011-10-30 22:21 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 Howard B. Golden 2003-10-22 10:42:17 UTC
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.
Comment 1 Howard B. Golden 2003-10-22 10:55:41 UTC
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.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2003-10-22 11:01:41 UTC
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).
Comment 3 Howard B. Golden 2003-10-22 11:09:13 UTC
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.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2003-10-22 11:14:20 UTC
Well, you should've mentioned that in your report. Re-assinging to the python
people.
Comment 5 Alastair Tse (RETIRED) gentoo-dev 2003-10-22 12:47:54 UTC
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. 
Comment 6 Howard B. Golden 2003-10-22 15:43:28 UTC
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.