Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77754 - emerge portage failes with traceback -- NameError: global name 'primaryuri_index' is not defined
Summary: emerge portage failes with traceback -- NameError: global name 'primaryuri_in...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 83104 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-12 16:16 UTC by Emil Beinroth
Modified: 2005-07-14 06:58 UTC (History)
2 users (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 Emil Beinroth 2005-01-12 16:16:53 UTC
My portage-version is sys-apps/portage-2.0.51-r10.

appro / # emerge portage
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/portage-2.0.51-r10 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3036, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1837, in merge
    retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug)
  File "/usr/lib/portage/pym/portage.py", line 2570, in doebuild
    if not fetch(fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
  File "/usr/lib/portage/pym/portage.py", line 1678, in fetch
    filedict[myfile].insert(primaryuri_index, myuri)
NameError: global name 'primaryuri_index' is not defined

Looks like there was something missed during the recent changes.
In /usr/lib/portage/pym/portage.py line 1678
    filedict[myfile].insert(primaryuri_index, myuri)
should be
    filedict[myfile].insert(primaryuri_indexes[myfile], myuri)
.. I guess.

I made it a blocker because I can't downgrade portage as a workaround.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51-r10 (default-linux/x86/2004.3, gcc-3.4.3,
glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r13 i686)
=================================================================
System uname: 2.6.9-gentoo-r13 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 17 2004, 04:40:08)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.90.0.1.1-r3
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mfpmath=sse
-fforce-addr -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4
-maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mfpmath=sse
-fforce-addr -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4
-maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays"
DISTDIR="/usr/local/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms userpriv"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror
http://www.ibiblio.org/pub/Linux/distributions/gentoo "
MAKEOPTS="-j5"
PKGDIR="/usr/local/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/bmg-gnome-current
/usr/local/portage/bmg-main /usr/local/portage/gentoo-de
/usr/local/portage/deltup /usr/local/portage/local"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow X alsa apm attr avi bash-completion bitmap-fonts cdr chroot crypt
cups directfb divx4linux doc encode f77 fbcon flac foomaticdb fortran gd gdbm
gtk gtk2 guile hyriand imagemagick imap imlib ithreads java jpeg libg++ libwww
mad matroska mbox mikmod mmx motif mpeg ncurses nfs nntp nptl nptlonly offensive
oggvorbis opengl oss pam pdflib perl png python quicktime readline reiserfs
samba sasl sdl slang spell sse ssl svga tcpd threads tiff truetype userlocales
x86 xml xml2 xmms xv xvid zlib"
Unset:  LDFLAGS
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2005-01-12 16:37:42 UTC
The ebuild will be adjust shortly to allow you to update/change versions.
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2005-01-14 19:19:04 UTC
Fixed and released in -r11 and -r12
Comment 3 Rok Jaklic 2005-02-03 06:53:06 UTC
I avoided this problem with putting line "=sys-apps/portage-2.0.51-r15" in package.mask and then updating portage to portage-2.0.51-r14.

After that I did emerge sync (but commenting previous added line in package.mask would be enough) and then update of portage was successful.
Comment 4 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-02-09 04:12:33 UTC
Workaround proposed in Comment #3 did the work for me.
Comment 5 Ioannis Aslanidis (RETIRED) gentoo-dev 2005-02-09 04:13:50 UTC
Even more simple it is to do it directly, without modifying any files:

# emerge "=sys-apps/portage-2.0.51-r14"
Comment 6 Tuan Van (RETIRED) gentoo-dev 2005-02-23 14:43:04 UTC
*** Bug 83104 has been marked as a duplicate of this bug. ***
Comment 7 Harald Kubota 2005-03-20 17:01:28 UTC
#3 and #5 would work if I still had portage-2.0.51-r14 around. However in the current portage tree there is -r15, and .18 and .19. Neither one I can emerge.
Thus I am currently stuck on several machines with an old emerge and I cannot update quite a lot of things because of this.

Any other fix?
Comment 8 Jason Stubbs (RETIRED) gentoo-dev 2005-03-20 18:37:26 UTC
Remove "primaryuri" from RESTRICT within the ebuild.
Comment 9 Harald Kubota 2005-03-21 05:50:22 UTC
Wow...quick, easy, and works. Thanks!
Comment 10 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:47:49 UTC
Fixed on or before 2.0.51.22-r1 
Comment 11 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:35 UTC
Looking through the batch of bugs, I'm not sure that some of these are 
actually fixed in stable. Others, the requirements have possibly changed after 
the initial fix was committed. 
 
If you think this bug has been closed incorrectly, please reopen or ask that 
it be reopened.