Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13176 - emerge -p -u world crashes with list index out of range
Summary: emerge -p -u world crashes with list index out of range
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 12630
  Show dependency tree
 
Reported: 2003-01-03 12:54 UTC by Robert Dunlop
Modified: 2011-10-30 22:19 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 Robert Dunlop 2003-01-03 12:54:30 UTC
Running "emerge -p -u world" on my recent 1.4rc1 install results in the
following traceback:

$ emerge -p -u world

These are the packages that I would merge, in order:

Calculating world dependencies \Traceback (most recent call last):
  File "/usr/bin/emerge", line 1754, in ?
    if not mydepgraph.xcreate(myaction):
  File "/usr/bin/emerge", line 939, in xcreate
    if not self.create(myk):
  File "/usr/bin/emerge", line 747, in create
    if not self.select_dep("/",mydep["/"],myparent=mp):
  File "/usr/bin/emerge", line 814, in select_dep
    mycheck=portage.dep_check(depstring,self.mydbapi[myroot])
  File "/usr/lib/python2.2/site-packages/portage.py", line 2220, in dep_check
    mylist=flatten(dep_listcleanup(dep_zapdeps(mysplit,mysplit2)))
  File "/usr/lib/python2.2/site-packages/portage.py", line 1976, in dep_zapdeps
    myresult=dep_zapdeps(unreduced[x],reduced[x])
  File "/usr/lib/python2.2/site-packages/portage.py", line 1960, in dep_zapdeps
    if unreduced[0]=="||":
IndexError: list index out of range


Emerge info reports:

# emerge info
Portage 2.0.46-r2 (default-x86-1.4, gcc-3.2.1, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.19-gentoo-r10 i686 Pentium III (Coppermine)
USE="x86 oss apm avi cups encode gif gpm imlib jpeg libg++ libwww mikmod mmx
motif mpeg ncurses oggvorbis pdflib png qtmt quicktime sdl spell svga truetype
xml2 xmms xv zlib gdbm berkdb slang readline java X tcpd pam ssl perl python
opengl -3dnow -arts -gnome -gtk -kde -qt -nls directfb cdr dvd mozilla pda crypt
snmp"
ARCH="x86"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CXXFLAGS="-march=pentium3 -O3 -pipe"
ACCEPT_KEYWORDS="x86"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
MAKEOPTS="-j2"
JDK_HOME=""
JAVA_HOME="/opt/blackdown-jre-1.3.1"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="http://www.ibiblio.org/pub/Linux/distributions/gentoo"

sys-apps/portage is version 2.0.46-r2


Looking at the file /usr/lib/python2.2/site-packages/portage.py the following
diff seems like a logical fix to me, but this is the first time I've even looked
at a Python program.

diff -c portage.py-orig portage.py
*** portage.py-orig     Sun Dec 22 11:13:52 2002
--- portage.py  Fri Jan  3 18:01:47 2003
***************
*** 1957,1962 ****
--- 1957,1964 ----
  def dep_zapdeps(unreduced,reduced):
        """Takes an unreduced and reduced deplist and removes satisfied
dependencies.
        Returned deplist contains steps that must be taken to satisfy
dependencies."""
+       if len(unreduced)==0:
+               return None
        if unreduced[0]=="||":
                if dep_eval(reduced):
                        #deps satisfied, return None


With the patch in place the emerge completes with a mozilla vs gnupg dependency
problem but that is an already reported bug.
Comment 1 SpanKY gentoo-dev 2003-01-03 17:41:04 UTC
i'm still not sure why this breaks || nick
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2003-02-03 04:29:59 UTC
Update portage.