Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90347 - global name mynewcat is not defined
Summary: global name mynewcat is not defined
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-04-25 03:30 UTC by Andrew Gaydenko
Modified: 2005-07-14 06:58 UTC (History)
0 users

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


Attachments
One line fix (mvbinpkg-fix.patch,284 bytes, patch)
2005-04-25 05:01 UTC, Jason Stubbs (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gaydenko 2005-04-25 03:30:24 UTC
I use ~x86

History. I have updated the system yesterday. Today, after rebooting I have noticed many small errors in my system, for example:

- /etc/modules.autoload.d/kernel-2.6 has not my additions
- /etc/conf.d/local.start  has not my additions
- /etc/conf.d/domainname is without my modification
- /etc/conf.d/hostname is without my modification

Probably something else :-(

I have decided to re-sync my system. Syncing ended with the error shown below (new portage files were received). Any further emerge attempt to sync begins and ends with this error too.

...
  File "/usr/bin/emerge", line 10, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 7353, in ?
    do_upgrade(mykey)
  File "/usr/lib/portage/pym/portage.py", line 7246, in do_upgrade
    db["/"]["bintree"].move_ent(mysplit)
  File "/usr/lib/portage/pym/portage.py", line 5697, in move_ent
    catfile.write(mynewcat+"\n")
NameError: global name 'mynewcat' is not defined



Reproducible: Always
Steps to Reproduce:
Comment 1 Andrew Gaydenko 2005-04-25 03:52:31 UTC
/etc/conf.d/clock was also returned to initial state.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-04-25 03:57:54 UTC
Post emerge --info output. 
Comment 3 Andrew Gaydenko 2005-04-25 04:07:44 UTC
As I have said, emerge using causes this error (full output is shown below). Why the issue status was changed to RESOLVED NEEDINFO?

////////////////////////////
emerge --info


Performing Global Updates: /usr/portage/profiles/updates/2Q-2005
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
.!!! Invalid binary package: porthole-0.4.1.tbz2
..........................%Traceback (most recent call last):
  File "/usr/bin/emerge", line 10, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 7353, in ?
    do_upgrade(mykey)
  File "/usr/lib/portage/pym/portage.py", line 7246, in do_upgrade
    db["/"]["bintree"].move_ent(mysplit)
  File "/usr/lib/portage/pym/portage.py", line 5697, in move_ent
    catfile.write(mynewcat+"\n")
NameError: global name 'mynewcat' is not defined
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-04-25 04:17:34 UTC
Comment #3: No, you said that emerge sync causes problems, not that any use of emerge causes traceback. Anyway, exact portage version is really important, are you using 2.0.51.20-r? 
Comment 5 Andrew Gaydenko 2005-04-25 04:26:17 UTC
sys-apps/portage-2.0.51.20-r4 is in use (was determined with qpkg :-)
Comment 6 Jason Stubbs (RETIRED) gentoo-dev 2005-04-25 05:01:25 UTC
Created attachment 57171 [details, diff]
One line fix

Will do -r5 in a day or two.
Comment 7 Andrew Gaydenko 2005-04-25 05:18:09 UTC
Jason,

Thanks! emerge seems to work now. 

Does found bug explain a silent overwriting of user's config files?
Which other side-effects must I look for?
Comment 8 Jason Stubbs (RETIRED) gentoo-dev 2005-04-25 05:23:09 UTC
The config file issue was due to not adding the appropriate variables to the profiles. If you synced and portage-2.0.51-r4 was available, the issue was gone - even before you upgraded.
Comment 9 Andrew Gaydenko 2005-04-25 05:26:21 UTC
I have not synced and upgraded now - just added a line to portage.py file. I'm going to wait for r5.
Comment 10 Jason Wever (RETIRED) gentoo-dev 2005-04-26 09:37:37 UTC
This seems better in -r5, but I still get this error when running fixpackages.  Several quaters of updates seem to work fine until we get to this error below;

Performing Global Updates: /usr/portage/profiles/updates/1Q-2003
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
......................@%Traceback (most recent call last):
  File "/usr/sbin/fixpackages", line 10, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 7353, in ?
    do_upgrade(mykey)
  File "/usr/lib/portage/pym/portage.py", line 7246, in do_upgrade
    db["/"]["bintree"].move_ent(mysplit)
  File "/usr/lib/portage/pym/portage.py", line 5697, in move_ent
    catfile.write(mynewcat+"\n")
NameError: global name 'mynewcat' is not defined
Comment 11 Jason Stubbs (RETIRED) gentoo-dev 2005-04-26 09:47:23 UTC
Are you 100% sure that traceback came while running -r5? I can't see how it is possible...
Comment 12 Jason Wever (RETIRED) gentoo-dev 2005-04-26 10:36:58 UTC
Yes, it is definitely -r5.  I specifically upgraded to it to see if this problem was resolved.
Comment 13 Jason Stubbs (RETIRED) gentoo-dev 2005-04-26 16:29:52 UTC
Can you attach portage.py please? I really can't see how it's possible with the code that I'm looking at.
Comment 14 Jason Wever (RETIRED) gentoo-dev 2005-04-26 19:12:34 UTC
it appears to have been related to how I copied the new ebuild of portage from one host to another.  Sorry for the noise.
Comment 15 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:48:11 UTC
Fixed on or before 2.0.51.22-r1 
Comment 16 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:49 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.