Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28535 - global exception handling
Summary: global exception handling
Status: RESOLVED OBSOLETE
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Documentation (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 66941 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-12 10:13 UTC by schenkel
Modified: 2013-02-15 23:05 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 schenkel 2003-09-12 10:13:33 UTC
when i make a 
#emerge gawk 

the emerge stop with this message: 

Traceback (most recent call last):
  File "/usr/bin/emerge", line 2073, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1288, in merge
    retval=portage.doebuild(y,"merge",myroot,edebug)
  File "/usr/lib/python2.2/site-packages/portage.py", line 1793, 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 1913, in merge
    mylink.create()
  File "/usr/lib/python2.2/site-packages/portage.py", line 4075, in create
    os.makedirs(self.dbdir)
  File "/usr/lib/python2.2/os.py", line 204, in makedirs
    mkdir(name, mode)
OSError: [Errno 5] Input/output error: '/var/db/pkg/sys-apps/gawk-3.1.3'

my emerge info :


Portage 2.0.49-r3 (default-x86-1.4, gcc-3.2.3, glibc-unavailable, 2.4.20-gentoo-r5)
=================================================================
System uname: 2.4.20-gentoo-r5 i686 Pentium III (Coppermine)
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
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=pentium3 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache"
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=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm gtk
imlib java jpeg kde gnome libg++ libwww mad mikmod mmx motif mpeg ncurses nls
oggvorbis pam pdflib png python qt quicktime readline sdl slang spell ssl svga
tcpd truetype xml2 xmms xv zlib tetex X opengl"

i make 
#emerge rsync
#emerge -u system 

and the emerge break with a similar message 

thanks for the help
Comment 1 SpanKY gentoo-dev 2003-09-12 17:33:09 UTC
OSError: [Errno 5] Input/output error: '/var/db/pkg/sys-apps/gawk-3.1.3'

you've got errors or something
try making the directory manually, if that fails, run fsck on the partition

nick: i'm leaving this open because i'd like to see better error handling in these cases ... things like "Unable to make directory '/var/db/pkg/sys-apps/gawk-3.1.3' because of error 'Input/output error'"
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2003-12-24 15:10:36 UTC
There are a lot of error conditions, and setting up exception
handling for all of them would cause a very large slow down.

Excessive hand hold isn't a goal of portage. It wouldn't be
a bad idea to have a reference manual or some kind of FAQ that
explains the errors as people discover them all.
Comment 3 SpanKY gentoo-dev 2003-12-24 15:44:23 UTC
yeah, but what about a global catch all ?

i'm not saying set up an error handling tree for every errno, just one catch all that says 'oh wtf is this ?  you should check permissions/drive full/fsck'
Comment 4 Brian Harring (RETIRED) gentoo-dev 2005-02-27 23:18:50 UTC
"There are a lot of error conditions, and setting up exception
handling for all of them would cause a very large slow down.

Excessive hand hold isn't a goal of portage. It wouldn't be
a bad idea to have a reference manual or some kind of FAQ that
explains the errors as people discover them all."
Dumping a 20 line traceback to users sucks... cause nothing is stated.
They just look at it and go 'wtf'.  Easy enough to stick in something custom, "Err.. yay. you hit a bug, the traceback has been saved to /tmp/$(rand), post this to bugs.gentoo.org after searching for a similar bug".

Meanwhile... I'm adding a global exception handler to cvs head shortly.
Comment 5 Brian Harring (RETIRED) gentoo-dev 2005-08-09 02:20:47 UTC
Bah, forgot about this.
It's a UI implementation thing, but modifying frontends so they add an unhandled
traceback handler that dumps the traceback, and *all* locals from all stack
frames (lot, but it's useful) to a tmp file, then dumping the traceback, or a
message along the lines of "err, portage kind of ate itself, sorry" would be good...

Kind of changes my mind on this one; it's a UI thing imo, I don't think portage
should force a default tb handler on UI's...
Comment 6 Jason Stubbs (RETIRED) gentoo-dev 2005-08-09 06:13:21 UTC
I'd say if possible that tb handler should be attached on the portage API 
level and sent to the UI by whatever message passing framework is used. Then 
just need to make sure there's no bugs in the message passing framework. ;) 
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-10-16 01:05:33 UTC
*** Bug 66941 has been marked as a duplicate of this bug. ***