Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34066 - Emerging python-2.3.2-r1.ebuild causes breaking of Python programs
Summary: Emerging python-2.3.2-r1.ebuild causes breaking of Python programs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-21 16:16 UTC by Isam Bayazidi
Modified: 2003-12-06 06:45 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 Isam Bayazidi 2003-11-21 16:16:04 UTC
I emerged python-2.3.2-r1.ebuild using the following command:
emerge  dev-lang/python/python-2.3.2-r1.ebuild

The output of it was as follows (last few lines)
Listing /usr/lib/python2.3/site-packages ...                              [ ok ]
 * Byte compiling python modules for python-2.3 .....                     [ ok ]

 *
 * If you have just upgraded from python-2.2.x you will need to run:
 *
 * /usr/portage/dev-lang/python/files/python-updater
 *
 * This will automatically rebuild all the python dependent modules
 * to run with python-2.3.
 *
 * Python 2.2 is still installed and can be accessed via /usr/bin/python2.2.
 * Portage-2.0.49-r8 and below will continue to use python-2.2.x, so
 * think twice about uninstalling it, otherwise your system will break.


I followed the orders I executed python-updater:
home portage # /usr/portage/dev-lang/python/files/python-updater
Traceback (most recent call last):
  File "/usr/bin/portageq", line 9, in ?
    import portage,types,string
ImportError: No module named portage
Traceback (most recent call last):
  File "/usr/bin/portageq", line 9, in ?
    import portage,types,string
ImportError: No module named portage
 * Unable to proceed. Can not find PORTDIR. Make sure the command:
 *
 *   portageq portdir
 *
 * returns a value. If it doesn't, make sure you have updated to
 * latest portage version.
 *
 * Report bugs to http://bugs.gentoo.org/

So I executed portageq portdir as it suggested:
home portage # portageq portdir
Traceback (most recent call last):
  File "/usr/bin/portageq", line 9, in ?
    import portage,types,string
ImportError: No module named portage

Now Emerge (portage) does not work, none of the Python Based programs  work
either. When I attempt to run emerge here is what I get:
home portage # emerge -p portage
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


Reproducible: Always
Steps to Reproduce:
Comment 1 Rob Cakebread (RETIRED) gentoo-dev 2003-11-21 17:09:26 UTC
What version of portage are you using? You should have emerged
sys-apps/portage-2.0.49-r16 before python-2.3.2-r1

Follow the directions in this file to get portage working again:
/usr/portage/sys-apps/portage/files/README.RESCUE
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2003-11-23 03:07:59 UTC
that is a bit annoying, i'll have to add a pkg_setup() to stop people from shooting themselves in the foot.

bug reporter, if you modify the symlink /usr/bin/python to point to /usr/bin/python2.2, you should be able to get a working portage back, then upgrade to portage-2.0.49-r16 and then try again. note that you should have read the comment in packages.mask which is the correct way to merge masked packages.
Comment 3 Andy Dustman 2003-11-23 10:17:15 UTC
I've found that if I unmask:

>=sys-apps/portage-2.0.49-r16
=dev-lang/python-2.3*
=dev-python/python-docs-2.3*

that I am unable to merge either the new portage or python normally, apparently due to a circular dependency:

>>> emerge (1 of 2) dev-lang/python-2.3.2-r2 to /
>>> md5 src_uri ;-) Python-2.3.2.tgz
 * Dependency Failed! Requires >=sys-apps/portage-2.0.49-r16
 
!!! ERROR: dev-lang/python-2.3.2-r2 failed.
!!! Function pkg_setup, Line 47, Exitcode 0
!!! Requires >=sys-apps/portage-2.0.49-r16

To get it to work:

emerge -u --nodeps portage

Then you can merge python-2.3.2-r2 successfully.

Or else, you might be able to unmask portage first, merge it, then unmask python and merge it.
Comment 4 Alastair Tse (RETIRED) gentoo-dev 2003-11-23 12:38:50 UTC
well, if you do emerge without -u, then it wouldn't try to pull python in as an upgraded dependency.

the problem here is that too many people are not reading packages.mask and just merging python-2.3.2 without upgrading to the newest portage. so the thing is you have to "emerge \=sys-apps/portage-2.0.49-r16" before you start to merge python-2.3.

unfortunately, there's not pretty way to handle this until portage-2.0.49-r16 gets moved out of packages.mask. we'll have to live with this until that happens.
Comment 5 Alastair Tse (RETIRED) gentoo-dev 2003-12-06 06:45:05 UTC
-r17 is out in ~x86. and python-2.3.2 is also .. so pretty much this closes this bug. please open another one if you have similar problems, because you shouldn't be able to shoot yourselves in the foot :)