Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281355 - sys-apps/portage-2.2_rc* IndexError on updating Portage cache
Summary: sys-apps/portage-2.2_rc* IndexError on updating Portage cache
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 210077 288499
  Show dependency tree
Reported: 2009-08-13 17:15 UTC by Togge
Modified: 2009-10-11 01:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

handle the IndexError (eclasses_indexerror.patch,637 bytes, patch)
2009-08-13 18:12 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Togge 2009-08-13 17:15:49 UTC
When doing an "emerge --sync" I recently get the following traceback.

After this the first emerge command is really slow but produces no errors, after this everything is back to normal.

>>> Updating Portage cache
80% [===========================================================>              ]Traceback (most recent call last):
  File "/usr/bin/emerge", line 40, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/", line 1307, in emerge_main
    return action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/lib64/portage/pym/_emerge/", line 2181, in action_sync
    action_metadata(settings, portdb, myopts, porttrees=[myportdir])
  File "/usr/lib64/portage/pym/_emerge/", line 1566, in action_metadata
    dest = tree_data.dest_db[cpv]
  File "/usr/lib64/portage/pym/portage/cache/", line 40, in __getitem__
    d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"])
  File "/usr/lib64/portage/pym/portage/cache/", line 226, in reconstruct_eclasses
    d[eclasses[x]] = (eclasses[x + 1], long(eclasses[x + 2]))
IndexError: list index out of range

Reproducible: Always

Steps to Reproduce:

Portage 2.2_rc35 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r4 x86_64)
System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9400_@_2.53GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 13 Aug 2009 16:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1, 3.1
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe -march=core2 -ggdb"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=core2 -ggdb"
FEATURES="assume-digests buildpkg ccache distlocks fixpackages installsources metadata-transfer parallel-fetch preserve-libs sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans usepkg userfetch"
LINGUAS="en sv sv_SE en_US"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude=".cvs" --exclude="patches""
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/portage/layman/kde-testing /usr/portage/local/private"
USE="X a52 aac aalib accessibility acpi aiglx alsa amd64 asf avahi avi bash-completion berkdb bitmap-fonts bluetooth branding browserplugin bzip2 ccache cli cracklib crypt cscope css cups curl cvs dbus divx divx4linux dlloader dri dts dvb dvd dvdread ffmpeg flac foomaticdb freetype gcj gdbm geoip gimp gmedia gmp gpm htmlhandbook http iconv id3tag ieee1394 imap imlib ipv6 isdnlog ithreads java java6 javascript jfs jpeg kde kdeenablefinal kdehiddenvisibility kdepim lm_sensors logitech-mouse maildir mmx mmx2 mmxext mng mod_python mono mozbranding moznopango mozsvg mp3 mp4 mplayer msn msse4.1 mudflap multilib ncurses nls nptl nptlonly nsplugin ntfs nvidia obex oggvorbis opengl openmp oscar pam pch pcre pdf pdflib perl phonon plasma png ppds pppd python qt qt3support qt4 readline realmedia reflection reiserfs samba scanner session smp spl sse sse2 sse4cpudetection ssl ssse3 startup-notification subversion svg symlink sysfs syslog taglib tcpd tetex theora threads tiff tk truetype-fonts twolame type1-fonts udev unicode usb v4l v4l2 vim-syntax vim-with-x visualization vnc webkit wifi wmf wmp wps wxwindows x264 xcomposite xface xfs xine xorg xosd xpm xvid zeroconf zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="synaptics mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sv sv_SE en_US" NETBEANS_MODULES="apisupport harness ide java nb websvccommon ruby webcommon" USERLAND="GNU" VIDEO_CARDS="nvidia"
Comment 1 Zac Medico gentoo-dev 2009-08-13 18:12:57 UTC
Created attachment 201165 [details, diff]
handle the IndexError

If this is saved as /tmp/eclasses_indexerror.patch, then it can be applied as follows:

 patch /usr/lib/portage/pym/portage/cache/ /tmp/eclasses_indexerror.patch

After that, `emerge --metadata` should succeed.
Comment 2 Zac Medico gentoo-dev 2009-08-21 23:18:08 UTC
This is fixed in 2.2_rc39.
Comment 3 Zac Medico gentoo-dev 2009-10-11 01:02:35 UTC
This is fixed in 2.1.7.