Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47785 - myportapi not checked if null before use
Summary: myportapi not checked if null before use
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-13 20:03 UTC by Evan Teran
Modified: 2004-04-14 10:06 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 Evan Teran 2004-04-13 20:03:42 UTC
$ emerge
Traceback (most recent call last):
File "/usr/bin/emerge", line 14, in ?
import portage
File "/usr/lib/portage/pym/portage.py", line 6128, in ?
settings.regenerate() # XXX: Regenerate use after we get a vartree -- GLOBAL
File "/usr/lib/portage/pym/portage.py", line 1392, in regenerate
self.configdict["auto"]["USE"]=autouse(db[root]["vartree"],use_cache=use_cache)
File "/usr/lib/portage/pym/portage.py", line 1121, in autouse
myresult=dep_check(mydep,myvartree.dbapi,None,use="no",use_cache=use_cache)
File "/usr/lib/portage/pym/portage.py", line 3309, in dep_check
mylist=flatten(dep_listcleanup(dep_zapdeps(mysplit,mysplit2)))
File "/usr/lib/portage/pym/portage.py", line 3052, in dep_zapdeps
myresult=dep_zapdeps(unreduced[x],reduced[x])
File "/usr/lib/portage/pym/portage.py", line 3038, in dep_zapdeps
elif myportapi.match(x):
AttributeError: 'NoneType' object has no attribute 'match' 

this is the error i got, I can't reproduce on all my gentoo boxes, but the ones that it does happen with it happens all the time.

i was able to fix by chaning line 3038 in /usr/lib/portage/pym/portage.py to contain a check like so:

elif myportapi.match(x):

to

elif myportapi and myportapi.match(x):


------------------------------------

portage information:
$ emerge --version
Portage 2.0.50-r5 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5)
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2004-04-14 10:06:24 UTC
Pushed out 2.0.50-r6. This is already fixed in development versions.