Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage 2.0.49-r18 fails due to error in /usr/lib/portage/py
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Mon Dec 01, 2003 6:26 pm    Post subject: Portage 2.0.49-r18 fails due to error in /usr/lib/portage/py Reply with quote

There is a serious error in Portage 2.0.49-r18 that causes all emerge -uvp to fail with the following error:

Code:

emerge -u --deep world
Calculating world dependencies |Traceback (most recent call last):
  File "/usr/bin/emerge", line 2170, in ?
    if not mydepgraph.xcreate(myaction):
  File "/usr/bin/emerge", line 1011, in xcreate
    myeb=portage.portdb.xmatch("bestmatch-visible",mydep)
  File "/usr/lib/portage/pym/portage.py", line 4065, in xmatch
    myval=best(self.xmatch("match-visible",None,mydep,mykey))
  File "/usr/lib/portage/pym/portage.py", line 4076, in xmatch
    myval=self.match2(mydep,mykey,self.xmatch("list-visible",None,mydep,mykey))
  File "/usr/lib/portage/pym/portage.py", line 4062, in xmatch
    myval=self.gvisible(self.visible(self.cp_list(mykey)))
  File "/usr/lib/portage/pym/portage.py", line 4145, in gvisible
    myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])
  File "/usr/lib/portage/pym/portage.py", line 3822, in aux_get
    writemsg(str(red("\naux_get():")+" (0) Error in "+mycpv+" ebuild. ("+str(ret)+")\n"
NameError: global name 'ret' is not defined


The solution is as follows:

1. Edit /usr/lib/portage/pym/portage.py and go to line 3822

2. Change
writemsg(str(red("\naux_get():")+" (0) Error in "+mycpv+" ebuild. ("+str(ret)+")\n"
to
writemsg(str(red("\naux_get():")+" (0) Error in "+mycpv+" ebuild. ("+str(myret)+")\n"

3. Save the changes.

Erik
_________________
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7209
Location: Pelotas, BR

PostPosted: Mon Dec 01, 2003 6:45 pm    Post subject: Reply with quote

Bug report here
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
irasnyd
Apprentice
Apprentice


Joined: 16 Feb 2003
Posts: 286
Location: Placentia, CA

PostPosted: Thu Dec 04, 2003 4:13 am    Post subject: Reply with quote

I'm getting a similar issue here:
Code:

root@palomino root $ emerge -upv world

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

Calculating world dependencies /Traceback (most recent call last):
  File "/usr/bin/emerge", line 2103, in ?
    if not mydepgraph.xcreate(myaction):
  File "/usr/bin/emerge", line 1009, in xcreate
    myeb=portage.portdb.xmatch("bestmatch-visible",mydep)
  File "/usr/lib/python2.2/site-packages/portage.py", line 4050, in xmatch
    myval=best(self.xmatch("match-visible",None,mydep,mykey))
  File "/usr/lib/python2.2/site-packages/portage.py", line 4061, in xmatch
    myval=self.match2(mydep,mykey,self.xmatch("list-visible",None,mydep,mykey))
  File "/usr/lib/python2.2/site-packages/portage.py", line 4047, in xmatch
    myval=self.gvisible(self.visible(self.cp_list(mykey)))
  File "/usr/lib/python2.2/site-packages/portage.py", line 4130, in gvisible
    myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])
  File "/usr/lib/python2.2/site-packages/portage.py", line 3748, in aux_get
    myebuild,in_overlay=self.findname2(mycpv)
ValueError: need more than 0 values to unpack


Here is the output of emerge info:
Code:

root@palomino root $ emerge info
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-test11-love2)
=================================================================
System uname: 2.6.0-test11-love2 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.4.3.12
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -Os -mmmx -m3dnow -msse -mfpmath=sse -ffast-math -fforce-addr -fforce-mem -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -Os -mmmx -m3dnow -msse -mfpmath=sse -ffast-math -fforce-addr -fforce-mem -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox autoaddcvs ccache fixpackages"
GENTOO_MIRRORS="http://oss.redundant.com/pub/gentoo http://cudlug.cudenver.edu/gentoo/ http://gentoo.ccccom.com ftp://gentoo.ccccom.com ftp://mirrors.tds.net/gentoo"
MAKEOPTS="-j2"
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="x86 3dnow alsa avi cdr cups curl directfb dvd esd fbcon ggi gif gtk gtk2 ipv6 java jpeg mmx moznoirc mpeg -nptl oggvorbis opengl oss pam pdflib png python radeon readline spell sse ssl svga truetype usb X xface xmms xv zlib"


Any help for this one? (Note that 'emerge -upv system' works just fine)
Back to top
View user's profile Send private message
the_Shrike
n00b
n00b


Joined: 10 Dec 2003
Posts: 3
Location: Helsinki, FI

PostPosted: Wed Dec 10, 2003 9:15 pm    Post subject: Reply with quote

Hum. I started getting this sort of output when running emerge after my system crashed (don't ask, 2.6 twiddling) during emerge sync:
Code:
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6, in ?
    import os,sys,portage,emergehelp,xpak,string,re,commands,time,threading,shutil,traceback
  File "/usr/lib/python2.2/site-packages/portage.py", line 4353, in ?
    do_vartree()
  File "/usr/lib/python2.2/site-packages/portage.py", line 4341, in do_vartree
    if not virts_p.has_key(vkeysplit[1]):
IndexError: list index out of range


Note, this happens with every possible action, even just a plain 'emerge' with no arguments.
Any ideas?
Back to top
View user's profile Send private message
shakti
Guru
Guru


Joined: 15 May 2002
Posts: 358
Location: omnipresent

PostPosted: Thu Dec 11, 2003 3:06 am    Post subject: Reply with quote

I did just an emerge rsync and now when doing emerge -pu portage i get:

Code:
Calculating dependencies ...done!
[ebuild     U ] sys-apps/coreutils-5.0.91-r2 [5.0-r3]
[ebuild     U ] sys-apps/debianutils-1.16.7-r4 [1.16.7-r3]
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2133, in ?
    mydepgraph.display(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1103, in display
    elif (not "--emptytree" in myopts) and portage.db[x[1]]["vartree"].exists_specific_cat(x[2]):
  File "/usr/lib/python2.2/site-packages/portage.py", line 3469, in exists_specific_cat
    self.invalidentry(self.root+"var/db/pkg/"+a[0]+"/"+x)
AttributeError: vartree instance has no attribute 'invalidentry'


thats no good...
_________________
Using Gentoo since 2002.
Back to top
View user's profile Send private message
the_Shrike
n00b
n00b


Joined: 10 Dec 2003
Posts: 3
Location: Helsinki, FI

PostPosted: Thu Dec 11, 2003 5:46 am    Post subject: Reply with quote

Ahh, my problem got solved with removing the current portage tree (figures) and untarring the snapshot from the installation livecd.
*crosses fingers hoping nothing more b0rked*
Back to top
View user's profile Send private message
shakti
Guru
Guru


Joined: 15 May 2002
Posts: 358
Location: omnipresent

PostPosted: Fri Dec 12, 2003 3:44 am    Post subject: Reply with quote

the_Shrike wrote:
Ahh, my problem got solved with removing the current portage tree (figures) and untarring the snapshot from the installation livecd.
*crosses fingers hoping nothing more b0rked*


all of /usr/portage ?
hmm sounds like major surgery to me
_________________
Using Gentoo since 2002.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2734
Location: Gainesville, Florida

PostPosted: Tue Dec 16, 2003 3:12 pm    Post subject: Reply with quote

So, what's the consensus? I'm using portage 2.0.49-r15 right now with no problems, on an ~x86 system. Everytime I do an emerge sync, I get the update portage lines. Should I update to -r18, or is that going to risk bork my Gentoo? From what I'm reading, r18 may have problems.I need to do a world update, but am fairly worried about the amount of packages, and especially things like gcc and glibc. I like to stay up-to-date, but do I really need all these updates, or would I be likely to foul things up? I installed kde3.2-beta2 fine, so I don't need the kde 3.1.4.

What danger is there in doing them individually, instead of all at one time, and not doing gcc and glibc, mozilla, and kde, etc., at all?

Thanks,
wrc1944
------------------------------------------------------------------------------------------------------------
mymachine wrc # emerge -p world

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

Calculating world dependencies
*** Package in world file is not installed: xfce-base/xfce4
...done!
[ebuild U ] sys-apps/man-pages-1.64 [1.61]
[ebuild U ] sys-libs/zlib-1.2.1 [1.1.4-r4]
[ebuild U ] media-libs/alsa-lib-1.0.0_rc2 [0.9.7]
[ebuild U ] media-sound/alsa-utils-1.0.0_rc2 [0.9.7]
[ebuild U ] sys-apps/module-init-tools-0.9.15_pre4 [0.9.15_pre3]
[ebuild U ] sys-apps/portage-2.0.49-r18 [2.0.49-r15]
*** Portage will stop merging at this point and reload itself,
recalculate dependencies, and complete the merge.
You may avoid the remerging of packages by updating portage on its own.

[ebuild U ] net-ftp/gftp-2.0.16-r1 [2.0.15]
[ebuild U ] sys-apps/procps-3.1.14-r1 [3.1.14]
[ebuild U ] sys-apps/shadow-4.0.3-r9 [4.0.3-r7]
[ebuild U ] net-misc/wget-1.9.1-r2 [1.9-r2]
[ebuild N ] sys-kernel/gentoo-sources-2.4.22-r1
[ebuild U ] net-im/gaim-0.74-r1 [0.72-r1]
[ebuild U ] sys-devel/libperl-5.8.2 [5.8.0]
[ebuild U ] dev-lang/perl-5.8.2-r1 [5.8.2]
[ebuild U ] kde-base/arts-1.1.4 [1.1.3]
[ebuild N ] kde-base/kdelibs-3.1.4
[ebuild U ] kde-base/kdeedu-3.1.4 [3.1.3]
[ebuild U ] kde-base/kdemultimedia-3.1.4-r1 [3.1.3]
[ebuild U ] kde-base/kdebase-3.1.4 [3.1.3]
[ebuild U ] kde-base/kdenetwork-3.1.4 [3.1.3]
[ebuild U ] kde-base/kdeaddons-3.1.4 [3.1.3]
[ebuild N ] kde-base/kdepim-3.1.4
[ebuild U ] kde-base/kdetoys-3.1.4 [3.1.3]
[ebuild U ] kde-base/kdegames-3.1.4 [3.1.3]
[ebuild U ] kde-base/kdegraphics-3.1.4 [3.1.3]
[ebuild N ] kde-base/kdeadmin-3.1.4
[ebuild N ] kde-base/kdeartwork-3.1.4
[ebuild U ] kde-base/kdeutils-3.1.4 [3.1.3]
[ebuild N ] kde-base/kde-3.1.4
[ebuild U ] app-admin/gkrellm-2.1.22 [2.1.21]
[ebuild U ] sys-devel/gcc-3.3.2-r4 [3.3.2-r2]
[ebuild N ] app-crypt/hashalot-0.1.0
[ebuild U ] sys-apps/util-linux-2.12-r3 [2.12]
[ebuild U ] gnome-base/libbonoboui-2.4.1 [2.4.0]
[ebuild U ] net-print/foomatic-db-engine-20031018 [3.0.0]
[ebuild U ] net-print/foomatic-filters-20031018 [3.0.0]
[ebuild U ] net-print/foomatic-db-20031018 [20030716]
[ebuild U ] net-print/foomatic-20031018 [3.0.0]
[ebuild U ] sys-devel/libtool-1.4.3-r3 [1.4.3-r2]
[ebuild N ] dev-lang/python-2.3.2-r2
[ebuild U ] net-www/mozilla-firebird-0.7-r1 [0.7]
[ebuild U ] sys-libs/pam-0.77 [0.75-r11]
[ebuild U ] net-misc/rsync-2.5.7 [2.5.6-r4]
[ebuild U ] sys-apps/debianutils-1.16.7-r4 [1.16.7-r3]
[ebuild U ] dev-util/cvs-1.11.10-r1 [1.11.9]
[ebuild U ] net-misc/dhcpcd-1.3.22_p4-r3 [1.3.22_p4-r2]
[ebuild U ] gnome-base/gail-1.4.1 [1.4.0]
[ebuild U ] gnome-base/gnome-desktop-2.4.1.1 [2.4.0]
[ebuild N ] net-www/mozilla-1.5-r1
[ebuild U ] net-www/epiphany-1.0.6 [1.0]
[ebuild U ] gnome-extra/bug-buddy-2.4.1 [2.4.0]
[ebuild U ] gnome-base/eel-2.4.1 [2.4.0]
[ebuild U ] gnome-base/nautilus-2.4.1-r2 [2.4.0]
[ebuild U ] gnome-base/libgnomeprint-2.4.2 [2.4.0]
[ebuild U ] media-libs/audiofile-0.2.4 [0.2.3-r1]
[ebuild U ] gnome-extra/gnome-games-2.4.1.1 [2.4.0]
[ebuild U ] gnome-extra/gcalctool-4.3.16 [4.3.3]
[ebuild U ] gnome-base/libbonobo-2.4.2 [2.4.0]
[ebuild U ] gnome-extra/gnome-utils-2.4.1 [2.4.0]
[ebuild U ] gnome-extra/acme-2.4.2 [2.4.0]
[ebuild U ] gnome-base/gnome-session-2.4.1 [2.4.0]
[ebuild U ] x11-wm/metacity-2.6.3 [2.6.1]
[ebuild U ] media-libs/gstreamer-0.6.4 [0.6.3]
[ebuild U ] media-libs/gst-plugins-0.6.4 [0.6.3]
[ebuild U ] media-plugins/gst-plugins-oss-0.6.4 [0.6.3]
[ebuild U ] gnome-base/gnome-panel-2.4.1 [2.4.0-r1]
[ebuild U ] x11-themes/gnome-themes-2.4.1 [2.4.0]
[ebuild U ] gnome-extra/yelp-2.4.2 [2.4.0]
[ebuild U ] media-gfx/eog-2.4.1 [2.4.0]
[ebuild U ] gnome-extra/gucharmap-1.2.0 [1.0.0]
[ebuild U ] gnome-extra/gnome2-user-docs-2.4.1 [2.4.0]
[ebuild U ] app-text/gpdf-0.111 [0.110]
[ebuild U ] gnome-extra/gnome-media-2.4.1.1 [2.4.0]
[ebuild U ] gnome-base/libgtop-2.0.7 [2.0.5]
[ebuild U ] gnome-base/libgnomeprintui-2.4.2 [2.4.0]
[ebuild U ] gnome-base/gnome-vfs-2.4.1 [2.4.0]
[ebuild U ] x11-libs/gtksourceview-0.7.0 [0.6.0]
[ebuild N ] app-editors/gedit-2.4.1
[ebuild U ] x11-terms/gnome-terminal-2.4.2 [2.4.0.1]
[ebuild U ] gnome-base/ORBit2-2.8.3 [2.8.1]
[ebuild U ] gnome-base/gnome-applets-2.4.1-r2 [2.4.1-r1]
[ebuild U ] gnome-base/gdm-2.4.1.7-r1 [2.4.1.6]
[ebuild U ] dev-libs/atk-1.4.1 [1.4.0]
[ebuild U ] x11-libs/libwnck-2.4.0.1-r1 [2.4.0.1]
[ebuild U ] app-text/ggv-2.4.0.2 [2.4.0.1]
[ebuild U ] app-arch/file-roller-2.4.2 [2.4.0.1]
[ebuild U ] gnome-base/gnome-2.4.1 [2.4]
[ebuild U ] sys-apps/coreutils-5.0.91-r2 [5.0.91]
[ebuild U ] sys-libs/glibc-2.3.3_pre20031212 [2.3.2-r8]
[ebuild U ] sys-apps/cronbase-0.2.1-r3 [0.2.1-r2]
[ebuild U ] sys-apps/vixie-cron-3.0.1-r4 [3.0.1-r1]
[ebuild U ] net-misc/iputils-021109 [020927]
[ebuild U ] app-admin/metalog-0.8_pre20031130 [0.7-r1]
[ebuild U ] net-print/cups-1.1.20 [1.1.19-r1]
[ebuild U ] sys-apps/baselayout-1.8.6.12-r2 [1.8.6.12]
[ebuild U ] media-video/mplayer-1.0_pre3 [1.0_pre2]

mymachine wrc #
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.8.2, kernel 3.14.0-gentoo (USE=experimental)
Back to top
View user's profile Send private message
gncuster
n00b
n00b


Joined: 16 Aug 2002
Posts: 20

PostPosted: Wed Dec 17, 2003 1:37 am    Post subject: same error as irasnyd Reply with quote

I am having a simular issue:

Code:
gncuster root # emerge -uDp world

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

Calculating world dependencies \Traceback (most recent call last):
  File "/usr/bin/emerge", line 2170, in ?
    if not mydepgraph.xcreate(myaction):
  File "/usr/bin/emerge", line 1011, in xcreate
    myeb=portage.portdb.xmatch("bestmatch-visible",mydep)
  File "/usr/lib/portage/pym/portage.py", line 4065, in xmatch
    myval=best(self.xmatch("match-visible",None,mydep,mykey))
  File "/usr/lib/portage/pym/portage.py", line 4076, in xmatch
    myval=self.match2(mydep,mykey,self.xmatch("list-visible",None,mydep,mykey))
  File "/usr/lib/portage/pym/portage.py", line 4062, in xmatch
    myval=self.gvisible(self.visible(self.cp_list(mykey)))
  File "/usr/lib/portage/pym/portage.py", line 4145, in gvisible
    myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])
  File "/usr/lib/portage/pym/portage.py", line 3759, in aux_get
    myebuild,in_overlay=self.findname2(mycpv)
ValueError: need more than 0 values to unpack


However emerge -uDp system works fine.

Code:
gncuster root # emerge -uDp system

These are the packages that I would merge, in order:
                               
Calculating system dependencies ...done!
[ebuild     U ] sys-devel/gcc-3.3.2-r4 [3.3.2-r3]
[ebuild     U ] sys-libs/glibc-2.3.3_pre20031212 [2.3.2-r9]
[ebuild     U ] dev-libs/libxml2-2.6.3 [2.6.2]
[ebuild     U ] dev-libs/libxslt-1.1.1 [1.1.0]
[ebuild     U ] x11-themes/gnome-themes-2.4.1 [2.4.0]
[ebuild     U ] sys-apps/man-pages-1.64 [1.61]


Code:
gncuster root # emerge info       
Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-test6)
=================================================================
System uname: 2.6.0-test6 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"     
AUTOCLEAN="yes"                 
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"       
COMPILER="gcc3"                 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /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/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache cccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dfx 3ds S3TC X X509 aalib amd apache2 apm ardour-ksi arts autofs avi bonobo cdr crypt cups dashboard dedicated dga directfb dnd dvb dvd emacs encode esd ethereal evo faad fbcon fluidsynth foomaticdb gb gd gdbm ggi gif ginac gnome gnomedb gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imap imlib ipalias jack jack-tmpfs jikes joystick jpeg kerberos krb4 ladcca ldap leim libg++ libgda libwww mad maildir mbox md5sum mdb mikmod motif mozilla moznoirc moznomail mozp3p mozsvg mozxmlterm mpeg music nas ncurses nls nocd nowin odbc offensive ofx oggvorbis openal opengl oss pam pda pdflib perl php pic png postgres ppds python qt quicktime readline samba scanner sdl slang slp snmp sox spell sqlite src sse ssl stroke svga tcltk tcpd tetex tiff transcode truetype trusted type1 usb videos vim-with-x x86 xine xml2 xmms xv xvid zlib"
Back to top
View user's profile Send private message
theonly
n00b
n00b


Joined: 02 Sep 2003
Posts: 22
Location: Cincinnati, OH, United States

PostPosted: Wed Dec 17, 2003 2:43 am    Post subject: Reply with quote

I'm getting the same error as 'the_Shrike' - and I'd prefer to avoid his/her solution of removing the entire /usr/portage tree and replacing it with the tarball on the live cd.... I may do that, though. Any other ideas?

Code:
# emerge info
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6, in ?
    import os,sys,portage,emergehelp,xpak,string,re,commands,time,threading,shutil,traceback
  File "/usr/lib/python2.2/site-packages/portage.py", line 4353, in ?
    do_vartree()
  File "/usr/lib/python2.2/site-packages/portage.py", line 4341, in do_vartree
    if not virts_p.has_key(vkeysplit[1]):
IndexError: list index out of range


the_Shrike wrote:
Hum. I started getting this sort of output when running emerge after my system crashed (don't ask, 2.6 twiddling) during emerge sync:
Code:
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6, in ?
    import os,sys,portage,emergehelp,xpak,string,re,commands,time,threading,shutil,traceback
  File "/usr/lib/python2.2/site-packages/portage.py", line 4353, in ?
    do_vartree()
  File "/usr/lib/python2.2/site-packages/portage.py", line 4341, in do_vartree
    if not virts_p.has_key(vkeysplit[1]):
IndexError: list index out of range


Note, this happens with every possible action, even just a plain 'emerge' with no arguments.
Any ideas?

_________________
theonlyjuan.net
Back to top
View user's profile Send private message
Yokodzun
n00b
n00b


Joined: 17 Dec 2003
Posts: 8
Location: Kiev, Ukrain

PostPosted: Wed Dec 17, 2003 2:19 pm    Post subject: Reply with quote

I have problem whis emerge sync too:

Code:

Number of files transferred: 115
Total file size: 53743645 bytes
Total transferred file size: 19597 bytes
Literal data: 7889 bytes
Matched data: 11708 bytes
File list size: 1532013
Total bytes written: 2808
Total bytes read: 1542836

wrote 2808 bytes  read 1542836 bytes  5865.82 bytes/sec
total size is 53743645  speedup is 34.77

>>> Updating Portage cache...
Traceback (most recent call last):
File "/usr/bin/emerge", line 1830, in ?
mynodes=portage.portdb.cp_all()

File "/usr/lib/python2.2/site-packages/portage.py", line 3982, in
cp_all
for y in listdir(self.root+"/"+x,EmptyOnError=1,ignorecvs=1):
File "/usr/lib/python2.2/site-packages/portage.py", line 224, in
listdir
if os.path.isdir(mypath):
File "/usr/lib/python2.2/posixpath.py", line 184, in isdir
st = os.stat(path)
TypeError: stat() argument 1 must be (encoded string
without NULL bytes), not str


How I can "reinstal" emerge?
Back to top
View user's profile Send private message
camresu
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2003
Posts: 93

PostPosted: Thu Dec 18, 2003 1:22 am    Post subject: same error Reply with quote

theonly wrote:
I'm getting the same error as 'the_Shrike' - and I'd prefer to avoid his/her solution of removing the entire /usr/portage tree and replacing it with the tarball on the live cd.... I may do that, though. Any other ideas?

Code:
# emerge info
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6, in ?
    import os,sys,portage,emergehelp,xpak,string,re,commands,time,threading,shutil,traceback
  File "/usr/lib/python2.2/site-packages/portage.py", line 4353, in ?
    do_vartree()
  File "/usr/lib/python2.2/site-packages/portage.py", line 4341, in do_vartree
    if not virts_p.has_key(vkeysplit[1]):
IndexError: list index out of range


the_Shrike wrote:
Hum. I started getting this sort of output when running emerge after my system crashed (don't ask, 2.6 twiddling) during emerge sync:
Code:
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6, in ?
    import os,sys,portage,emergehelp,xpak,string,re,commands,time,threading,shutil,traceback
  File "/usr/lib/python2.2/site-packages/portage.py", line 4353, in ?
    do_vartree()
  File "/usr/lib/python2.2/site-packages/portage.py", line 4341, in do_vartree
    if not virts_p.has_key(vkeysplit[1]):
IndexError: list index out of range


Note, this happens with every possible action, even just a plain 'emerge' with no arguments.
Any ideas?


I get the same py error. I was on #gentoo on irc but my windoze machine messed up, there was a hint to edit one of my source pointers (sym link) but I don't know how to fix this...

Any hints ?
_________________
---I used to use a mac -- now macs use Linux - I am backwards --
---- cam resu ___ mac user --- camresu ___
Back to top
View user's profile Send private message
bulletman
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2002
Posts: 126

PostPosted: Thu Dec 18, 2003 5:34 pm    Post subject: Reply with quote

I just reemerged portage (from portage-2.0.49-r18 to the same version), and now I don't see the problem anymore.

Worth a shot anyway.
_________________
Stephen

If your desktop gets out of control easily,
you probably have too much stuff on it that
doesn't need to be there.
Donna Smallin, "Unclutter Your Home"
Back to top
View user's profile Send private message
theonly
n00b
n00b


Joined: 02 Sep 2003
Posts: 22
Location: Cincinnati, OH, United States

PostPosted: Thu Dec 18, 2003 11:13 pm    Post subject: Reply with quote

If you can re-emerge portage, you don't have the same problem. :)
_________________
theonlyjuan.net
Back to top
View user's profile Send private message
RikBlankestijn
Guru
Guru


Joined: 01 May 2003
Posts: 315
Location: Arnhem the Netherlands

PostPosted: Sat Dec 27, 2003 8:05 pm    Post subject: Reply with quote

I got this:
Code:
root@theJoker files # emerge -Uv python
>>> --upgradeonly implies --update... adding --update to options.
Calculating dependencies ...done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2153, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1309, in merge
    portage.settings["FEATURES"]=string.join(myfeat)
  File "/usr/lib/portage/pym/portage.py", line 1260, in __setitem__
  File "/usr/lib/portage/pym/portage.py", line 1098, in modifying
Exception: Configuration is locked.


so portage.py gives an error, the thing does not even exist

Code:

root@theJoker rik # ls -al /usr/lib/portage/pym/portage.py
ls: /usr/lib/portage/pym/portage.py: No such file or directory


I've found this thread because I've problems with the portage. You can read my post "emerge" broken after doing "emerge portage&a I also seem to have problems with the different versions in "emerge --version" (2.0.50_pre3) and "emerge search portage" (latest installed is 2.0.49-r15) I'm lost..
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8995
Location: beyond the rim

PostPosted: Tue Dec 30, 2003 4:42 pm    Post subject: Reply with quote

ok, we have a lot of different errors here, lets do them one by one:
RikBlankestijn: looks like you played with the _pre series and messed somthing up, remove /usr/lib/portage/pym completely and re-emerge portage (you have some leftover .pyc files there that don't play well with your version of emerge).
shakti: please see bug 31901
irasnyd, gncuster: check your PORTDIR_OVERLAY for misnamed ebuilds

For the other errors please check http://bugs.gentoo.org and report them there if there aren't any reports yet.
Back to top
View user's profile Send private message
RikBlankestijn
Guru
Guru


Joined: 01 May 2003
Posts: 315
Location: Arnhem the Netherlands

PostPosted: Tue Dec 30, 2003 6:25 pm    Post subject: Reply with quote

Genone wrote:

RikBlankestijn: looks like you played with the _pre series and messed somthing up, remove /usr/lib/portage/pym completely and re-emerge portage (you have some leftover .pyc files there that don't play well with your version of emerge).
...


My problem was solved when I did the rescue procedure and emerged the latest (unstable) portage again. I will sertainly try the above next time I have an issue like this again. Thanks for your comment.

One more thing. When I like to do "emerge -e world" it always wants to downgrade the portage. I don't like that. Why not just -e everything again just as it is currently installed?? Because after he's finished with the portage downgrade the portage is broken.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum