Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 143730

Summary: Portage 2.1.1_pre5 won't sync with empty portage tree
Product: Portage Development Reporter: emerald <dirk>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS, REGRESSION
Priority: High    
Version: 2.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 136244    
Attachments: fix the AttributeError

Description emerald 2006-08-12 16:27:37 UTC
portage (i don't know since when) up to at least 2.1-r2 can sync with an empty portage tree, it will thow a few error messages but sync and refresh an completely empty tree, whereas portage 2.1.1 fails with an error and makes one fetch a portage snapshot form a mirror, install this one first and then can sync again
error message:

Traceback (most recent call last):
  File "/usr/bin/emerge", line 4012, in ?
    emerge_main()
  File "/usr/bin/emerge", line 3731, in emerge_main
    settings, trees, mtimedb = load_emerge_config()
  File "/usr/bin/emerge", line 3642, in load_emerge_config
    trees = portage.create_trees(trees=trees, **kwargs)
  File "/usr/lib/portage/pym/portage.py", line 6736, in create_trees
    config_incrementals=portage_const.INCREMENTALS)
  File "/usr/lib/portage/pym/portage.py", line 955, in __init__
    for k, v in rawpusemask.iteritems():
AttributeError: 'NoneType' object has no attribute 'iteritems'

this possibility was nice to empty out one's portage tree which had already 'splattered' throughout the whole partition and get a new one nicely in one place, which done from time to time made sync'ing, portage operations and even the whole system somewhat faster again.

dirk.
Comment 1 Zac Medico gentoo-dev 2006-08-12 22:38:59 UTC
Created attachment 94110 [details, diff]
fix the AttributeError

This is fixed in svn r4240.  If you save the patch as /tmp/AttributeError.patch, then you can apply it as follows:

cd /usr/lib/portage
patch -p0 < /tmp/AttributeError.patch
Comment 2 Zac Medico gentoo-dev 2006-08-12 23:19:11 UTC
simple temporary fix:

mkdir -p /etc/portage/profile
Comment 3 Zac Medico gentoo-dev 2006-08-14 02:27:43 UTC
This has been released in 2.1.1_pre5-r1.