Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140041 - Error: global name 'portage_exception' is not defined
Summary: Error: global name 'portage_exception' is not defined
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 136244 142283
  Show dependency tree
 
Reported: 2006-07-11 14:52 UTC by Jakub Paluszak
Modified: 2006-07-31 16:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fix the NameError for 'portage_exception' (NameError.patch,532 bytes, patch)
2006-07-11 16:32 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Paluszak 2006-07-11 14:52:39 UTC
I tried to update audacious ver. 1.1.0 and I get the following error report after typing emerge -u audacious:

Calculating dependencies... done!
>>> Emerging (1 of 1) media-sound/audacious-1.1.0 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3524, in ?
    mydepgraph.merge(pkglist)
  File "/usr/bin/emerge", line 2056, in merge
    retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug,tree="porttree")
  File "/usr/lib/portage/pym/portage.py", line 2944, in doebuild
    if need_distfiles and not fetch(fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
  File "/usr/lib/portage/pym/portage.py", line 2084, in fetch
    if portage_util.ensure_dirs(mydir, gid=portage_gid, mode=dirmode, mask=modemask):
  File "/usr/lib/portage/pym/portage_util.py", line 715, in ensure_dirs
    raise portage_exception.OperationNotPermitted(str(oe))
NameError: global name 'portage_exception' is not defined

My emerge --info:

Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-ck1-r1 i686)
=================================================================
System uname: 2.6.17-ck1-r1 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz
Gentoo Base System version 1.6.15
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-pipe -O3 -march=pentium4 -fomit-frame-pointer -fno-ident"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-pipe -O3 -march=pentium4 -fomit-frame-pointer -fno-ident"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer prelink sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="16bit 7zip X a52 aac acpi alsa apm asf asm audiofile avi berkdb bidi bitmap-fonts browserplugin bzip2 bzlib cairo cddb cdparanoia cdr cdrom cjk cli crypt cups curl directfb dlloader dri dts dvd dvdread emboss encode exif extras fame fbcon ffmpeg firefox flac fontconfig foomaticdb fortran freetype ftp gd gdbm gg gif gimp gimpprint gkrellm glibc-omitfp gmp gnome gphoto2 gpm gs gstreamer gtk gtk2 gzip iconv icq id3 idn ieee1394 imagemagick imap imlib isdnlog jabber java javascript jp2 jpeg krb4 lcms libg++ libwww live mad matroska mikmod mime mmap mmx mmx2 mmxext motif mp3 mpeg mpeg2 mpeg4 mplayer msn musepack ncurses network nfs nls nocardbus nojoystick nptl nsplugin ntfs offensive ogg oggvorbis opengl oscar pam pcre pdflib perl pic png pnp ppds pppd python qt qt3 quicktime rar readline real reflection reiserfs rtc samba sdl session shared sharedmem sndfile sox spell spl sse sse2 ssl stroke subtitles svg svga tcltk tcpd tetex theora tiff tlen trayicon truetype truetype-fonts type1 type1-fonts udev unicode usb userlocales vcd videos vorbis wifi win32codecs wma wmf x86 xine xml xml2 xorg xosd xpm xv xvid yahoo zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_synaptics kernel_linux linguas_en_GB userland_GNU video_cards_sis video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Zac Medico gentoo-dev 2006-07-11 16:32:26 UTC
Created attachment 91523 [details, diff]
fix the NameError for 'portage_exception'

This patch will fix the NameError, but I'm not sure why you received an Operation Not Permitted error there.  What type of filesystem is /usr/portage/distfiles on?

If you save the patch as /tmp/NameError.patch, then you can apply it as follows:

cd /usr/lib/portage
patch -p0 < /tmp/NameError.patch
Comment 2 Jakub Paluszak 2006-07-11 16:51:47 UTC
(In reply to comment #1)
> Created an attachment (id=91523) [edit]
> fix the NameError for 'portage_exception'
> 
> This patch will fix the NameError, but I'm not sure why you received an
> Operation Not Permitted error there.  What type of filesystem is
> /usr/portage/distfiles on?

Thx a lot for the patch, now everything's fine. /usr/portage/distfiles is on an ext3 partition bound to the right spot in filesystem. It worked like that for half a year... The thing is that this ext3 partition is on an external HDD with a lousy controller, so maybe the controller flatlined for a moment, it happened like before. Anyway, I think portage shouldn't throw errors like this at me.

> 
> If you save the patch as /tmp/NameError.patch, then you can apply it as
> follows:
> 
> cd /usr/lib/portage
> patch -p0 < /tmp/NameError.patch
> 

Comment 3 Zac Medico gentoo-dev 2006-07-11 17:20:29 UTC
(In reply to comment #2)
> a lousy controller, so maybe the controller flatlined for a moment, it happened
> like before. Anyway, I think portage shouldn't throw errors like this at me.

It's certainly a bug.  The intention is for portage to be tolerant of $DISTDIR errors as much as possible.
Comment 4 Zac Medico gentoo-dev 2006-07-11 20:21:25 UTC
This was fixed in svn r3494 about a month ago and realeased in 2.1.1_pre1.  It should go into 2.1-r2.
Comment 5 Zac Medico gentoo-dev 2006-07-31 08:31:38 UTC
This is in svn r4057 for 2.1-r2.
Comment 6 Zac Medico gentoo-dev 2006-07-31 16:28:06 UTC
This has been released in 2.1-r2.