Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1829 - Portage system breaks permanently on power loss
Summary: Portage system breaks permanently on power loss
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-16 04:14 UTC by Charles N. Burns
Modified: 2011-10-30 22:37 UTC (History)
1 user (show)

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 Charles N. Burns 2002-04-16 04:14:49 UTC
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)
Comment 1 Jon Nelson (RETIRED) 2002-04-16 08:44:40 UTC
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".
Comment 2 Jeffry 2002-04-21 11:13:20 UTC
i had the same problem with xfs.. i reinstalled gentoo. i could not merge annything. 
Comment 3 Daniel Robbins (RETIRED) gentoo-dev 2002-04-22 00:36:34 UTC
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.