Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25073 - Portage unusable after latest sync (1430 Eastern) - while trying to Perform Global updates (bad variable)
Summary: Portage unusable after latest sync (1430 Eastern) - while trying to Perform G...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-22 11:49 UTC by Gary Stein
Modified: 2011-10-30 22:20 UTC (History)
0 users

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 Gary Stein 2003-07-22 11:49:30 UTC
Performing Global Updates: /usr/portage/profiles/updates/3Q-2003
(Could take a couple minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
.Traceback (most recent call last):
  File "/usr/bin/emerge", line 13, in ?
    import portage
  File "/usr/lib/python2.2/site-packages/portage.py", line 5032, in ?
    do_upgrade(mykey)
  File "/usr/lib/python2.2/site-packages/portage.py", line 4966, in do_upgrade
    db["/"]["bintree"].move_ent(mysplit)
  File "/usr/lib/python2.2/site-packages/portage.py", line 3814, in move_ent
    self.populate()
  File "/usr/lib/python2.2/site-packages/portage.py", line 3893, in populate
    if (not os.path.isdir(self.pkgdir+"/All") and not getbinpkg):
NameError: global name 'getbinpkg' is not defined

looks like the python code has an english based plural problem
getbinpkgs and getbinpkg are both used as variables
the plural is instanciated when populate is called, getbinpkg never defined
by the time the first if happens portage.py line 3891

Iassume one should be plural and the other not

this renders emerge unusable, 
fixing this line fixes the problem

gary

Reproducible: Always
Steps to Reproduce:
1. emerge sync (on 1430 est from us rync)
2. emerge new packed
3. Fail

Actual Results:  
Performing Global Updates: /usr/portage/profiles/updates/3Q-2003
(Could take a couple minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
.Traceback (most recent call last):
  File "/usr/bin/emerge", line 13, in ?
    import portage
  File "/usr/lib/python2.2/site-packages/portage.py", line 5032, in ?
    do_upgrade(mykey)
  File "/usr/lib/python2.2/site-packages/portage.py", line 4966, in do_upgrade
    db["/"]["bintree"].move_ent(mysplit)
  File "/usr/lib/python2.2/site-packages/portage.py", line 3814, in move_ent
    self.populate()
  File "/usr/lib/python2.2/site-packages/portage.py", line 3893, in populate
    if (not os.path.isdir(self.pkgdir+"/All") and not getbinpkg):
NameError: global name 'getbinpkg' is not defined


Expected Results:  
Performing Global Updates: /usr/portage/profiles/updates/3Q-2003
(Could take a couple minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
..................................
Portage 2.0.48-r4 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)


this is fixed as said in comment now does
portage.py
line 3891 make plural
line 3893 make plural
line 3924 make plural

change getbinpkg to getbinpkgs
Comment 1 Gary Stein 2003-07-22 12:04:31 UTC
after I was able to fix those line

then I could emerge portage-2.0.48-r5
which seems to have these fixes

however only diff is:
6c6
< VERSION="2.0.48-r4"
---
> VERSION="2.0.48-r5"
3924c3924
<                       self.remotepkgs = getbinpkgs.dir_get_metadata(settings["PORTAGE_BINHOST"], chunk_size=chunk_size)
---
>                       self.remotepkgs = getbinpkg.dir_get_metadata(settings["PORTAGE_BINHOST"], chunk_size=chunk_size)

not sure if the new one (bottom) needs the plural there

sorry to bother, you guys fixed too quick, damn you responsive bug fixers....
but since I could not emerge previously because the bug, it might suck for others

gary
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2003-07-23 18:48:33 UTC
Simplist way is to use a rescue portage.