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.
at a guess, might I suggest rm -rf /var/cache/edb/dep/* && emerge sync and try again?
*** Bug 22720 has been marked as a duplicate of this bug. ***
*** Bug 22721 has been marked as a duplicate of this bug. ***
Ok I found the problem. /var/cache/edb/world was corrupted. Instead of a normal list of pkgs it was 7k of nonsense. example:
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.
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.
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?
is this still an issue ?
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)'
different problem: see bug 38168
well, the original problem seems to be fixed, reopen if this is still an issue (but only if it's the same error).