Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42230 - Portage 2.0.50-r1 - unchecked condition raises error - patch attached
Summary: Portage 2.0.50-r1 - unchecked condition raises error - patch attached
Status: RESOLVED DUPLICATE of bug 40831
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-20 01:15 UTC by Torsten Kurbad
Modified: 2005-07-17 13:06 UTC (History)
2 users (show)

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


Attachments
Patch to fix the problem (portage-2.0.50-r1-fix_myportapi_None.patch,367 bytes, patch)
2004-02-20 01:17 UTC, Torsten Kurbad
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Kurbad 2004-02-20 01:15:49 UTC
In /usr/lib/portage/pym/portage.py at line 3038 has to be

elif myportapi and myportapi.match(x):

instead of

elif myportapi.match(x):

since myportapi may be None at this point and then doesn't provide a match method (in fact, it then provides no method at all ;o)

Would be glad to see this officially fixed in the next version.

Regards,
Torsten

Reproducible: Always
Steps to Reproduce:
Comment 1 Torsten Kurbad 2004-02-20 01:17:06 UTC
Created attachment 25970 [details, diff]
Patch to fix the problem
Comment 2 Masatomo Nakano (RETIRED) gentoo-dev 2004-02-20 13:00:06 UTC

*** This bug has been marked as a duplicate of 40831 ***
Comment 3 Jeff Smelser 2004-04-08 01:09:37 UTC
I made this change and now all three of my boxes just hang.. 

Here is the output:

Traceback (most recent call last):
  File "/usr/bin/emerge", line 278, in ?
    tmpsettings = portage.config(clone=portage.settings)
  File "/usr/lib/portage/pym/portage.py", line 1301, in __init__
    self.regenerate()
  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 and myportapi.match(x):
  File "/usr/lib/portage/pym/portage.py", line 4714, in match
    return self.xmatch("match-visible",mydep)
  File "/usr/lib/portage/pym/portage.py", line 4701, in xmatch
    myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep,mykey))
  File "/usr/lib/portage/pym/portage.py", line 4687, in xmatch
    myval=self.gvisible(self.visible(self.cp_list(mykey)))
  File "/usr/lib/portage/pym/portage.py", line 4782, in gvisible
    myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])
  File "/usr/lib/portage/pym/portage.py", line 4547, in aux_get
    myret=doebuild(myebuild,"depend","/",self.mysettings,dbkey=mydbkey)
  File "/usr/lib/portage/pym/portage.py", line 2073, in doebuild
    mysettings.reset(use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 1338, in reset
    self.regenerate(use_cache=use_cache)
  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 and myportapi.match(x):
  File "/usr/lib/portage/pym/portage.py", line 4714, in match
    return self.xmatch("match-visible",mydep)
  File "/usr/lib/portage/pym/portage.py", line 4701, in xmatch
    myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep,mykey))
  File "/usr/lib/portage/pym/portage.py", line 4687, in xmatch
    myval=self.gvisible(self.visible(self.cp_list(mykey)))
  File "/usr/lib/portage/pym/portage.py", line 4782, in gvisible
    myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])
  File "/usr/lib/portage/pym/portage.py", line 4545, in aux_get
    mylock = lockfile(mydbkey,unlinkfile=1)
  File "/usr/lib/portage/pym/portage.py", line 89, in lockfile
    fcntl.flock(myfd,fcntl.LOCK_EX)
KeyboardInterrupt