Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46898 - Portage can not update itself from 2.0.50-r1 to 2.0.50-r3
Summary: Portage can not update itself from 2.0.50-r1 to 2.0.50-r3
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-05 15:19 UTC by ta2002
Modified: 2006-05-07 22:44 UTC (History)
1 user (show)

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 ta2002 2004-04-05 15:19:05 UTC
After I synced, I noticed and update to portage, and
tried to install it (several times) without success.


Reproducible: Always
Steps to Reproduce:
emerge portage
Actual Results:  
# emerge portage
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/portage-2.0.50-r3 to /
>>> md5 src_uri ;-) portage-2.0.50-r3.tar.bz2
>>> Unpacking source...
>>> Unpacking portage-2.0.50-r3.tar.bz2 to /var/tmp/portage/portage-2.0.
50-r3/work
>>> Source unpacked.
./create-localdecls
Checking truncate argument type... off_t
Checking libc version... libc.so.6
Checking glibc subversion... 2.3

gcc -march=i386 -O1 -pipe  -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -Wall -c 
libsandbox.c
gcc -march=i386 -O1 -pipe  -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -Wall -c 
sandbox_futils.c -o sandbox_futils.o
gcc libsandbox.o sandbox_futils.o -shared  -fPIC -ldl -lc -nostdlib -lgcc -o 
libsandbox.so
gcc -march=i386 -O1 -pipe  -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -Wall -c 
sandbox.c -o sandbox.o
gcc -march=i386 -O1 -pipe  -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT -Wall sandbox.
o sandbox_futils.o getcwd.c -ldl -lc -o sandbox

>>> Install portage-2.0.50-r3 into /var/tmp/portage/portage-2.0.50-r3/image/ 
category sys-apps
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "./setup.py", line 4, in ?
    from os import chdir, stat
ImportError: No module named os

!!! ERROR: sys-apps/portage-2.0.50-r3 failed.
!!! Function src_install, Line 94, Exitcode 1
!!! Failed to install missingos module

Expected Results:  
An upgrade without errors. :)

Machine always had python 2.3.3 (built in early February).
Tried re-emerging python, but it didn't help.
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2004-04-05 15:23:20 UTC
Do you still have python2.2 available? Is there a broken symlink?
Did you modify your python path in the environment?

type -p python2.2

What is the output?
Can you follow that and see what happens if you find a binary and run it?
Comment 2 ta2002 2004-04-05 17:38:06 UTC
> Do you still have python2.2 available?

I never installed python 2.2. 2.3.3 was the stable
build when I did the initial install in late January.

I have already upgraded portage twice (to 2.0.50 on
0207, and to 2.0.50-r1 on 0210.

> Is there a broken symlink?

I don't know how to look for one globally, but the
two main ones I would expect (/usr/bin/python and
/usr/bin/python2 both point to /usr/bin/python2.3).

> Did you modify your python path in the environment?

No (or certainly not deliberately). I tend not to
change things from the default.

> type -p python2.2

What is the output?

$ type -p python2.2
/usr/bin/python2.2

$ qpkg -f /usr/bin/python2.2
$

I don't know where that came from. I never installed 2.2
on this machine (and no package wants to claim it.

$ ls -al /usr/bin/python2.2
-rwxr-xr-x    1 root     root       899224 2003-09-11 04:55:50 /usr/bin/python2.2

Hmm. From the date, it looks like this came from the
install CD (Gentoo 1.4).

> Can you follow that and see what happens if you find
> a binary and run it?

$ /usr/bin/python2.2
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Python 2.2.3 (#1, Sep 11 2003, 04:54:30)
[GCC 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Well that looks familiar. I still don't know how to
fix it, but it seems like something confused between
2.2. and 2.3.
Comment 3 Brett I. Holcomb 2004-04-05 19:32:34 UTC
Same thing here.

python2.2 runs fine.  


Any idea why?

System
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.20-xfs-r4)
=================================================================
System uname: 2.4.20-xfs-r4 i686 AMD Athlon(TM) MP 2000+


>>> Install portage-2.0.50-r3 into /var/tmp/portage/portage-2.0.50-r3/image/ category sys-apps
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "./setup.py", line 4, in ?
    from os import chdir, stat
EOFError: EOF read where object expected

!!! ERROR: sys-apps/portage-2.0.50-r3 failed.
!!! Function src_install, Line 94, Exitcode 1
!!! Failed to install missingos module

root@strider root # type -p python2.2
/usr/bin/python2.2

Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2004-04-05 20:44:33 UTC
Python2.2 is broken on your systems...
Only thing I can suggest is removing those symlinks
and maybe yanking the /usr/lib/python2.2 directory.

Python guys: Aware of any explanation for this?
Comment 5 Nicholas Jones (RETIRED) gentoo-dev 2004-04-05 20:48:22 UTC
Anyone have ages on the boxes with problems?
Install stages timestamps? Randomy really old file?

ls -l /usr/bin/python2.2
ls -lL /usr/bin/python2.2
Comment 6 ta2002 2004-04-05 23:06:47 UTC
As I said before:

$ ls -al /usr/bin/pyt*
lrwxr-xr-x    1 root     root            9 2004-04-05 19:46:07 /usr/bin/python -> python2.3*
-rwxr-xr-x    1 root     root          178 2004-04-05 19:45:46 /usr/bin/python-config*
lrwxr-xr-x    1 root     root            9 2004-04-05 19:46:07 /usr/bin/python2 -> python2.3*
-rwxr-xr-x    1 root     root       899224 2003-09-11 04:55:50 /usr/bin/python2.2*
-rwxr-xr-x    1 root     root         4020 2004-04-05 19:45:46 /usr/bin/python2.3*

(I re-emerged python today to try to solve the problem).

$ ls -al /mnt/cdrom/stages/*
-rw-r--r--    1 root     root     11175550 2003-09-11 18:47:29 /mnt/cdrom/stages/stage1-x86-20030910.tar.bz2

I think the fact that I never knew about python 2.2 on this
machine (it installed 2.3.3 from the initial emerge sync)
has something to do with the problem (of course, that doesn't
explain how I updated to 2.0.50 and 2.0.50-r1 without any
trouble.
Comment 7 ta2002 2004-04-05 23:26:12 UTC
> Only thing I can suggest is removing those symlinks
> and maybe yanking the /usr/lib/python2.2 directory.

Nice suggestion. :)

# mv /usr/bin/python2.2 /usr/bin/python2.2.junk

# emerge portage

(completed normally)

One interesting thing:

 sys-apps/portage
    selected: 2.0.50-r1
   protected: 2.0.50-r3
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging sys-apps/portage-2.0.50-r1...
No package files given... Grabbing a set.

[...]

<<<        obj /usr/lib/python2.2/site-packages/missingos.so
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This file (the only one in the /usr/lib/python2.2 tree)
got removed and didn't get replaced. The original error
messages mentioned that file (I still don't understand
it, but maybe somebody will :) ).
Comment 8 Brett I. Holcomb 2004-04-06 15:31:55 UTC
Okay.  Worked here too.

How did this get messed up?  I simply installed 2.0.50-r1 when it was released.  I don't mess with python at all.

Comment 9 Brian Harring (RETIRED) gentoo-dev 2004-08-02 03:55:48 UTC
Reopen if this pops up again.
Comment 10 Alan Somers 2006-05-07 22:26:07 UTC
I just experienced the same bug after i upgraded to portage-2.1_pre10-r2 .  My symptoms are similar but not identical.  Neither python2.3 nor python2.4 work for me now.  Now whenever I start python I get the error 

somers@alanine ~/archive/pics/thanksgiving_2005 $ python2.4 -v
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.4/site.pyc matches /usr/lib/python2.4/site.py
import site # precompiled from /usr/lib/python2.4/site.pyc
# /usr/lib/python2.4/os.pyc matches /usr/lib/python2.4/os.py
import os # precompiled from /usr/lib/python2.4/os.pyc
import posix # builtin
# /usr/lib/python2.4/posixpath.pyc matches /usr/lib/python2.4/posixpath.py
import posixpath # precompiled from /usr/lib/python2.4/posixpath.pyc
# /usr/lib/python2.4/stat.pyc matches /usr/lib/python2.4/stat.py
import stat # precompiled from /usr/lib/python2.4/stat.pyc
# /usr/lib/python2.4/UserDict.pyc matches /usr/lib/python2.4/UserDict.py
import UserDict # precompiled from /usr/lib/python2.4/UserDict.pyc
# /usr/lib/python2.4/copy_reg.pyc matches /usr/lib/python2.4/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.4/copy_reg.pyc
# /usr/lib/python2.4/types.pyc matches /usr/lib/python2.4/types.py
import types # precompiled from /usr/lib/python2.4/types.pyc
# /usr/lib/python2.4/warnings.pyc matches /usr/lib/python2.4/warnings.py
import warnings # precompiled from /usr/lib/python2.4/warnings.pyc
# /usr/lib/python2.4/linecache.pyc matches /usr/lib/python2.4/linecache.py
import linecache # precompiled from /usr/lib/python2.4/linecache.pyc
import encodings # directory /usr/lib/python2.4/encodings
# /usr/lib/python2.4/encodings/__init__.pyc matches /usr/lib/python2.4/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.4/encodings/__init__.pyc
# /usr/lib/python2.4/codecs.pyc matches /usr/lib/python2.4/codecs.py
import codecs # precompiled from /usr/lib/python2.4/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.4/encodings/aliases.pyc matches /usr/lib/python2.4/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.4/encodings/aliases.pyc
# /usr/lib/python2.4/encodings/ascii.pyc matches /usr/lib/python2.4/encodings/ascii.py
import encodings.ascii # precompiled from /usr/lib/python2.4/encodings/ascii.pyc
Python 2.4.2 (#1, Oct  8 2005, 12:27:29) 
[GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

or for python-2.3:

somers@alanine ~/archive/pics/thanksgiving_2005 $ python2.3 -v
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
'import site' failed; traceback:
ImportError: No module named site
Python 2.3.5 (#1, Oct 30 2005, 09:23:46) 
[GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

I don't know why I could import zipimport, because site fails, as does os, pickle, and struct, which are all I tried.  If I set PYTHONHOME=/usr/lib/python2.4/ and export it, then all my modules fail just like they did for python2.3 .

somers@alanine ~/archive/pics/thanksgiving_2005 $ python2.4 -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
'import site' failed; traceback:
ImportError: No module named site
Python 2.4.2 (#1, Oct  8 2005, 12:27:29) 
[GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

/var/tmp/portage/portage-2.1_pre10-r2 has been automatically deleted, so I can't examine it.  And without a working installation of python, I can't update anything.  Is there some way to make a working python tree in another directory or on a cd-rom, and use that tree to run emerge?

I can't do emerge --info for obvious reasons.
Comment 11 Alan Somers 2006-05-07 22:29:34 UTC
I found my emerge --info from an older bug report, from feb-3-2006 :

emerge info:
Portage 2.1_pre3-r1 (default-linux/amd64/2005.0, gcc-3.3.4, glibc-2.3.5-r3,
2.6.1
5 x86_64)
=================================================================
System uname: 2.6.15 x86_64 AMD Opteron(tm) Processor 244
Gentoo Base System version 1.12.0_pre8
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabl
ed]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O0"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/
config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb
/usr/lib64/
mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/sha
re/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/
platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O0"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sfperms strict"
GENTOO_MIRRORS="http://gentoo.binarycompass.org http://gentoo.osuosl.org/
http://
gentoo.ccccom.com"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="amd64 X aalib acpi aim alsa apache2 audiofile avi berkdb bitmap-fonts
bonobo
 bzip2 crypt cups curl dga divx4linux doc dts dvd eds emboss encode exif expat
fa
m fbcon fftw flac foomaticdb fortran gd gdbm gif glut gmp gphoto2 gpm gstreamer
g
tk gtk2 gtkhtml guile idn imagemagick imlib ipv6 jack java jpeg lcms ldap
libcaca
 libwww lzw lzw-tiff mad maildir mbox mikmod mng mozilla mp3 mpeg mysql ncurses
n
ls nptl offensive ogg oggvorbis opengl oscar pam pam_chroot pcre pda pdflib
perl 
plotutils png python qt quicktime readline real recode samba sdl sharedmem
slang 
sockets spell sqlite ssl sysvipc tcltk tcpd tetex tiff truetype truetype-fonts
ty
pe1-fonts udev usb userlocales vorbis xanim xinerama xml xml2 xmms xpm xv xvid
zl
ib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 12 Zac Medico gentoo-dev 2006-05-07 22:44:11 UTC
(In reply to comment #10)
> My symptoms are similar but not identical.

Please file a new bug.