After updating from dev-lang/python-2.4.2 to dev-lang/python-2.4.3-r1 (and running python-updater), everything using python stopped working, including emerge: root@cube:~# emerge -pv portage Traceback (most recent call last): File "/usr/bin/emerge", line 12, in ? import portage File "/usr/lib/portage/pym/portage.py", line 58, in ? import getbinpkg File "/usr/lib/portage/pym/getbinpkg.py", line 8, in ? import htmllib,HTMLParser,string,formatter,sys,os,xpak,time,tempfile,base64,urllib2 ValueError: bad marshal data root@cube:~# python Python 2.4.3 (#1, Jul 2 2006, 11:22:12) [GCC 3.3.6 (Gentoo Hardened 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import string Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/string.py", line 83, in ? import re as _re File "/usr/lib/python2.4/re.py", line 5, in ? from sre import * ValueError: bad marshal data sascha@cube:~$ python2.3 /usr/bin/emerge --info Portage 2.1-r1 (hardened/x86/2.6, gcc-3.3.6, glibc-2.3.6-r4, 2.6.17.1-infra-cube-1 i686) ================================================================= System uname: 2.6.17.1-infra-cube-1 i686 AMD Athlon(tm) XP 1700+ Gentoo Base System version 1.6.15 distcc 2.18.3 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 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-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i586-pc-linux-gnu" CFLAGS="-march=pentium -mcpu=athlon-xp -O2 -pipe" CHOST="i586-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /usr/vice/etc /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/afs/modload /etc/env.d /etc/gconf /etc/make.globals /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=pentium -mcpu=athlon-xp -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig buildpkg ccache collision-protect distcc distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict test userfetch userpriv usersandbox" GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/" LANG="en_US" LC_ALL="" LINGUAS="en,de" MAKEOPTS="-j10 -s" PKGDIR="/usr/portage//packages/x86/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp/portage" PORTDIR="/usr/portage/" PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage-local--main--1.0" SYNC="rsync://copper.sascha.silbe.org/gentoo-portage" USE="3dnow 3dnowext S3TC X a52 aac accessibility acl afs alsa apm asf audiofile avi bash-completion berkdb blas bzip2 bzlib cairo cddb cdparanoia cdr chipcard cjk crypt css curl dlloader doc dts dv dvd dvdr dvdread ecc encode examples fame ffmpeg fits flac gd gdbm geldkarte geos gif gimp gimpprint glut gmp gs gtk gtk2 gtkhtml guile hardened hbci hdf idn imagemagick imap imlib ipv6 jabber jpeg jpeg2k lapack lcms libwww lm_sensors lvm1 lzo mad maildir mailwrapper makecheck mbox mikmod mjpeg mmx mmxext monitor mozsvg mp3 mpeg mplayer musepack music mysql nas ncurses netcdf nls nodrm nptl offensive ogdi ogg openal opengl oss pam pda pdf pdflib pic plotutils png postgres python qt qtmt quicktime rar readline samba scanner sdl serial skey smartcard speex spell sqlite sse ssl subtitles svg sysfs test tetex theora tidy tiff truetype unicode usb userlocales vcd vorbis win32codecs wmf x86 xml xml2 xorg xv xvid yv12 zlib elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux linguas_en,de userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Downgrading to python-2.4.2 (using python2.3 /usr/bin/emerge) fixed the problem. Upgrading to 2.4.3-r1 (and calling python-updater) didn't trigger the problem anymore, so I cannot reproduce it. :(
I'm afraid I'll have to close this NEEDINFO if it's not reproducable. If it happens again it might be interesting to move away all the .pyc and .pyo files and see if that fixes (the "marshal" data format is used to store those files).
I had same problem. When I ran emerge (no matter with or without any options) I got "bad marshal data". When I removed all .pyo and .pyc files from /usr/lib everything went back to normal. In my case the original reason of error was file system corruption.