Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42559 - site-packages directory is incompletely populated after upgrade to Python 2.3
Summary: site-packages directory is incompletely populated after upgrade to Python 2.3
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-23 01:32 UTC by Jeff Stearns
Modified: 2004-02-24 00:43 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 Jeff Stearns 2004-02-23 01:32:42 UTC
New Gentoo installations are born with Python version 2.2, but this gets upgraded to version 2.3 during the install.

After gentoo installation is complete, both Python versions remain installed.  However, version 2.3 is incomplete.

The python2.3/site-packages directory lacks certain modules which are present in the python2.2/site-packages directory.  These missing modules break some system utilities such as java-config.

Reproducible: Always
Steps to Reproduce:
1. Install gentoo 1.4 starting with stage 1.
2. Note that python is upgraded to version 2.3 by the time that installation is finished.
3. Run java-config.  Note that it fails because the java_config module cannot be imported.
4. Note that there is a /usr/lib/python2.2/site-packages directory and a .../python2.3/site-packages directory, and each has completely different contents.
5. Note that java-config uses python2.3, but it requires a module found only within the python2.2/site-packages directory.
Actual Results:  
u2 linux # java-config
Traceback (most recent call last):
  File "/usr/bin/java-config", line 14, in ?
    from java_config import jc_options
ImportError: No module named java_config


u2 linux # ls -l /usr/bin/python* 
lrwxrwxrwx    1 root     root            9 Feb 18 16:09 /usr/bin/python -> python2.3
-rwxr-xr-x    1 root     root          178 Feb 18 16:09 /usr/bin/python-config
lrwxrwxrwx    1 root     root            9 Feb 18 16:09 /usr/bin/python2 -> python2.3
-rwxr-xr-x    1 root     root       899224 Sep 10 21:55 /usr/bin/python2.2
-rwxr-xr-x    1 root     root         3956 Feb 18 16:09 /usr/bin/python2.3


u2 linux # ls -l /usr/lib/python*/site-packages
/usr/lib/python2.2/site-packages:
total 477
-rw-r--r--    1 root     root          119 Sep 10 21:55 README
-rw-r--r--    1 root     root         9221 Sep 10 20:51 cvstree.py
-rw-r--r--    1 root     root        10931 Feb 18 11:57 cvstree.pyc
-rw-r--r--    1 root     root         5660 Sep 10 20:51 dispatch_conf.py
-rwxr-xr-x    1 root     root        16380 Feb 18 13:19 fchksum.so
-rw-r--r--    1 root     root        14126 Sep 10 20:51 getbinpkg.py
-rw-r--r--    1 root     root        18769 Feb 18 11:57 getbinpkg.pyc
drwxr-xr-x    2 root     root          504 Feb 22 22:11 java_config
-rwxr-xr-x    1 root     root         5508 Feb 18 11:56 missingos.so
-rw-r--r--    1 root     root         2238 Sep 10 20:51 output.py
-rw-r--r--    1 root     root         6113 Feb 18 11:57 output.pyc
-rw-r--r--    1 root     root       163029 Sep 10 20:51 portage.py
-rw-r--r--    1 root     root       182082 Feb 18 11:57 portage.pyc
-rw-r--r--    1 root     root         9846 Sep 10 20:51 xpak.py
-rw-r--r--    1 root     root        15286 Feb 18 11:57 xpak.pyc

/usr/lib/python2.3/site-packages:
total 1025
-rw-r--r--    1 root     root          119 Feb 18 16:09 README
-rw-r--r--    1 root     root        15097 Feb 22 21:15 drv_libxml2.py
-rw-r--r--    1 root     root       261372 Feb 22 21:15 libxml2.py
-rw-r--r--    1 root     root       333940 Feb 22 21:15 libxml2mod.a
-rwxr-xr-x    1 root     root          855 Feb 22 21:15 libxml2mod.la
-rwxr-xr-x    1 root     root       254172 Feb 22 21:15 libxml2mod.so
-rw-r--r--    1 root     root        35808 Feb 22 21:22 libxslt.py
-rw-r--r--    1 root     root        68112 Feb 22 21:22 libxsltmod.a
-rwxr-xr-x    1 root     root          907 Feb 22 21:22 libxsltmod.la
-rwxr-xr-x    1 root     root        53720 Feb 22 21:22 libxsltmod.so
drwxr-xr-x   11 root     root          504 Feb 22 21:34 mx



Expected Results:  
When emerge upgraded python to version 2.3, it should have populated /usr/lib/python2.3/site-
packages with the contents of the python2.2/site-packages directory.


This happens on various systems.  Here is "emerge info'' from one of them:

Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.3-gentoo)
============================================================
=====
System uname: 2.6.3-gentoo i686 AMD Opteron(tm) Processor 244
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/
config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/
distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi acpi4linux antlr apm arts avi bcel berkdb bonobo bsh clisp cmucl crypt cscope cups 
curl dillo dnd doc dumb-allegro dv emacs emacs-w3 encode esd ethereal etwin evo exiscan-acl 
expat firebird flac flash foomaticdb foreign-package foreign-sysvinit freetds fs gdbm gif gimpprint 
ginac gmtsuppl gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml hbci hdf hdf5 imagemagick imap 
imlib innodb ipv6 jack jack-caps java javamail javascript jbig jdepend jikes jpeg junit jython kde 
ladcca libdsk libg++ libgda libwww lids log4j mad mcal md5sum mdb mikmod motif mozaccess 
mozcalendar mozinterfaceinfo mpeg mpi mule ncurses neXt nls nptl objc ocaml oci8 odbc 
offensive ofx oggvorbis opengl opie optional-tasks oro ospfapi oss pam parse-clocks pcap pdflib 
perl physfs pic plotutils png postgres ppds python qt quicktime radius readline regexp rhino rplay 
ruby samba sasl scanner sdk sdl slang slp snmp sox speex spell sqlite ssl stroke svga tcltk tcpd 
tcsim tiff truetype usb wmf wxwin wxwindows x86 xalan xerces xfs xml2 xmms xv zeo zlib"
Comment 1 SpanKY gentoo-dev 2004-02-23 20:00:18 UTC
did you run the python package updater like the post-install output said to ?
Comment 2 Jeff Stearns 2004-02-23 20:55:33 UTC
I can't say for sure whether I ran the updater or not.  I take notes during the install, and this step isn't listed, so I assume that I didn't do it.

As a rule, I do everything that emerge post-install scripts recommend, but I suspect that some post-install output slips past me unnoticed. (This can easily happen whenever emerge updates more than one package; it emits the post-install output but then continues onward spitting out the output from the next package being built.  Under these conditions, it's easy to miss important post-install messages buried among thousands of lines from makefiles and install scripts.)

Since it's safe to run python-updater multiple times, I ran it just now.  Nothing changed.  :-(

2004/02/23 20:44:27 - Starting Python Updater from 2.2 to 2.3 :
2004/02/23 20:44:27 - Searching for packages with files in /usr/lib/python2.2 ..
2004/02/23 20:44:30 - Calculating Upgrade Package List ..
2004/02/23 20:44:30 - Re-ordering packages to merge ..
2004/02/23 20:44:30 - Preparing to merge these packages in this order:
2004/02/23 20:44:30 - Python update completed successfully.
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2004-02-24 00:43:46 UTC
not a bug, all those files are portage's things and they've been moved to /usr/lib/portage/pym

i remember portage's ebuild trying to clean those files, but in theory they don't affect anything since any recent version of portage will be using python2.3 and not touch the python2.2 files.