Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22701 - emerge -up world is failing with TypeError:
Summary: emerge -up world is failing with TypeError:
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 22720 22721 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-12 14:44 UTC by Jay Nation
Modified: 2011-10-30 22:20 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 Jay Nation 2003-06-12 14:44:25 UTC
I can emerge individual pkgs or emerge -up or -u system but emerge -u or -up
world fails.

Reproducible: Always
Steps to Reproduce:
1.emerge -up world
2.
3.

Actual Results:  
nexus bluzman # emerge -up world

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

Calculating world dependencies  
Traceback (most recent call last):
  File "/usr/bin/emerge", line 1902, in ?
    if not mydepgraph.xcreate(myaction):
  File "/usr/bin/emerge", line 855, in xcreate
    if portage.db["/"]["vartree"].dbapi.match(x):
  File "/usr/lib/python2.2/site-packages/portage.py", line 3049, in match
    mydep=dep_expand(origdep,self)
  File "/usr/lib/python2.2/site-packages/portage.py", line 2508, in dep_expand
    return prefix+cpv_expand(mydep,mydb)+postfix
  File "/usr/lib/python2.2/site-packages/portage.py", line 2441, in cpv_expand
    if (not mydb.cp_list(mykey)) and virts and virts.has_key(mykey):
  File "/usr/lib/python2.2/site-packages/portage.py", line 3005, in cp_list
    mystat=os.stat(self.root+"var/db/pkg/"+mysplit[0])[ST_MTIME]
TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str

nexus bluzman # emerge -u world
Calculating world dependencies  
Traceback (most recent call last):
  File "/usr/bin/emerge", line 1902, in ?
    if not mydepgraph.xcreate(myaction):
  File "/usr/bin/emerge", line 855, in xcreate
    if portage.db["/"]["vartree"].dbapi.match(x):
  File "/usr/lib/python2.2/site-packages/portage.py", line 3049, in match
    mydep=dep_expand(origdep,self)
  File "/usr/lib/python2.2/site-packages/portage.py", line 2508, in dep_expand
    return prefix+cpv_expand(mydep,mydb)+postfix
  File "/usr/lib/python2.2/site-packages/portage.py", line 2441, in cpv_expand
    if (not mydb.cp_list(mykey)) and virts and virts.has_key(mykey):
  File "/usr/lib/python2.2/site-packages/portage.py", line 3005, in cp_list
    mystat=os.stat(self.root+"var/db/pkg/"+mysplit[0])[ST_MTIME]
TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str



Expected Results:  
It should have shown me the list of files it would update then in the second
instance it should have preformed the update.

nexus bluzman # emerge info
Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-gaming-r2 i686 AMD Athlon(tm) XP 2400+
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share
                       /config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow apm avi crypt encode gif jpeg kde libg++ libwww mikmod mmx mp
                       eg ncurses nls pdflib png quicktime spell truetype xml2
xmms xv zlib gtkhtml gdb                        m berkdb readline arts bonobo
svga tcltk java guile gpm tcpd pam ssl perl python                         imlib
qt motif opengl mozilla cdr X lirc mysql dvd sdl smpg cups gtk gnome alsa      
                  slang esd moznoirc moznocompose oggvorbis"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -mfpmath=sse -fforce-addr -fomit-frame-pointe
                       r -funroll-loops -falign-functions=4
-maccumulate-outgoing-args -ffast-math -fpr                       
efetch-loop-arrays"
CXXFLAGS="-march=athlon-xp -O3 -pipe -mfpmath=sse -fforce-addr -fomit-frame-poin
                       ter -funroll-loops -falign-functions=4
-maccumulate-outgoing-args -ffast-math -f                       
prefetch-loop-arrays"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"

BTW I tried rolling back the Cflags too.
I changed them to:
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
and I get the exact same results.
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-12 15:52:53 UTC
at a guess, might I suggest rm -rf /var/cache/edb/dep/* && emerge sync and try again?
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2003-06-12 20:46:03 UTC
*** Bug 22720 has been marked as a duplicate of this bug. ***
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2003-06-12 20:47:44 UTC
*** Bug 22721 has been marked as a duplicate of this bug. ***
Comment 4 Jay Nation 2003-06-13 05:56:07 UTC
Ok I found the problem. /var/cache/edb/world was corrupted. Instead of a normal list of pkgs it was 7k of nonsense. example: 
Comment 5 Jay Nation 2003-06-13 05:56:07 UTC
Ok I found the problem. /var/cache/edb/world was corrupted. Instead of a normal list of pkgs it was 7k of nonsense. example: ö«ö.öÚ÷¸õ.øÁõ'ùíõ³ùÌõéù´õ6ú-ö9û"÷[ü øàüBù.ýSû.ÿ°ý%.Sÿ(. .©.¥.a...î...´ ... I deleted the file and regenworld and the problem is solved. BTW I tried the rm -rf /var/cache/edb/dep/* && emerge sync thing first without success. I was just guessing when I checked the world file. Id never had it corrupt like that before.
Comment 6 AJ Armstrong 2003-07-29 11:11:43 UTC
I had the same problem, and my world file was intact.  Seemant's suggestion of "rm -rf /var/cache/edb/dep/* && emerge sync" solved the issue.  This set of errors apparently indicates corruption in either the world file or the dependancy cache - perhaps a trap and warn ?

As a side note, I was rambunctious and renamed the world file as well as cleaned out dep - the error did not resolve (and regenworld would not run) until I had resotred my original world file - so be wary of deleting the world file in this case.
Comment 7 Robert Cole 2003-11-24 22:42:07 UTC
I tried this solution to a simular problem I had and it didn't work but then I tried renaming the world file and that seems to have worked except now the system doesn't know what I have installed so when I do an "emerge -up world" to see whats new I get nothing but if I do an emerge -up <package name>" I'll see that there is an update if there is one for that package.

I've tried regen and emerge sync. How do I get the system to rebuild the installed packages list?
Comment 8 Martin Holzer (RETIRED) gentoo-dev 2003-12-07 16:37:53 UTC
is this still an issue ?
Comment 9 nicolasm 2004-01-17 06:56:44 UTC
Still a problem: just happened to me today. Tried removing edb cache, rsync, etc, did'nt work, because regenworld fails thusly:

# regenworld
(...)
add to world: media-sound/alsaplayer
add to world: media-sound/alsa-tools
Traceback (most recent call last):
  File "/usr/sbin/regenworld", line 58, in ?
    mylist=portage.db["/"]["vartree"].dbapi.match(mykey)
  File "/usr/lib/portage/pym/portage.py", line 3865, in match
    mymatch=match_from_list(mydep,self.cp_list(mykey))
  File "/usr/lib/portage/pym/portage.py", line 3258, in match_from_list
    raise KeyError, "Specific key requires an operator (%s)" % (mydep)
KeyError: 'Specific key requires an operator (media-sound/alsa-tools-1.0.0_rc2-r1)'
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2004-01-17 07:54:51 UTC
different problem: see bug 38168
Comment 11 Marius Mauch (RETIRED) gentoo-dev 2004-02-04 20:16:57 UTC
well, the original problem seems to be fixed, reopen if this is still an issue (but only if it's the same error).