As posted on Gentoo-users: About 5 seconds after running "emerge evolution" the power died.I was able to boot again just fine (I use XFS) but now absolutely nothing related to the portage system works! [root@tiamat:~] emerge yacc Calculating dependencies ...done! emerge dev-util/yacc-1.9.1-r1 to / md5 ;-) yacc-1.9.1.tar.Z Unpacking source... Unpacking yacc-1.9.1.tar.Z Source unpacked. rm yacc cc -s -O3 -march=i686 -malign-functions=4 -fomit-frame-pointer -fschedule-insns2 -fexpensive-optimizations -pipe -o yacc closure.c error.c lalr.c lr0.c main.c mkpar.c output.c reader.c skeleton.c symtab.c verbose.c warshall.c /tmp/ccSY02yJ.o: In function `create_file_names': /tmp/ccSY02yJ.o(.text+0x40d): the use of `mktemp' is dangerous, better use `mkstemp' Install yacc-1.9.1-r1 into /var/tmp/portage/yacc-1.9.1-r1/image/ category dev-util strip: /var/tmp/portage/yacc-1.9.1-r1/image/usr/bin/yacc Completed installing into /var/tmp/portage/yacc-1.9.1-r1/image/ Merging dev-util/yacc-1.9.1-r1 to / Traceback (most recent call last): File "/usr/bin/emerge", line 1314, in ? mydepgraph.merge(mydepgraph.altlist()) File "/usr/bin/emerge", line 590, in merge retval=portage.doebuild(y,"merge",myroot,edebug) File "/usr/lib/python2.2/site-packages/portage.py", line 1007, in doebuild return merge(settings["CATEGORY"],settings["PF"],settings["D"],settings["BUILDDIR"]+"/build-info",myroot,myebuild=settings["EBUILD"]) File "/usr/lib/python2.2/site-packages/portage.py", line 1262, in merge mylink.merge(pkgloc,infloc,myroot,myebuild) File "/usr/lib/python2.2/site-packages/portage.py", line 3000, in merge self.treewalk(mergeroot,myroot,inforoot,myebuild) File "/usr/lib/python2.2/site-packages/portage.py", line 2714, in treewalk packagecounter=long(globalcounterfile.readline()) ValueError: invalid literal for long(): [root@tiamat:~] ################ Please post any known workarounds or requests for add'l information. This /really/ needs to be looked into--reinstalling Gentoo would take all day (again)
I've killed the power numerous times on ext3 filesystems (before, during, and after emerge) and not experienced this kind of failure. XFS caches data in memory before it writes to disk. This may not be a portage bug, but an XFS "feature".
i had the same problem with xfs.. i reinstalled gentoo. i could not merge annything.
OK. Your counter file got fried due to XFS being a pain in el tushbo. I'm going to mark this as WONTFIX but if this turns into a common problem we'll need to address it. It's really a "why I don't use XFS" type problem. This is a good reason to rely on mtimes (metadata) instead of the counter value (data), so I'm sending this off to (cc'ing) karltk. To fix: rm /var/cache/edb/counter and create a new file with one line in it that has the number "1000" in it.