Fix dep_wordreduce() so that it doesn't cancel out blocker atoms that happen
authorZac Medico <zmedico@gentoo.org>
Wed, 20 Aug 2008 04:24:21 +0000 (04:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 20 Aug 2008 04:24:21 +0000 (04:24 -0000)
to be matched by package.provided.

svn path=/main/trunk/; revision=11442

pym/portage/__init__.py

index 42124708fb840588cd871caa126fdd976d1452d7..20c65fc4cc0dd2ed8050e6212aa58d283b52d193 100644 (file)
@@ -6485,12 +6485,14 @@ def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None,
 def dep_wordreduce(mydeplist,mysettings,mydbapi,mode,use_cache=1):
        "Reduces the deplist to ones and zeros"
        deplist=mydeplist[:]
-       for mypos in xrange(len(deplist)):
+       for mypos, token in enumerate(deplist):
                if isinstance(deplist[mypos], list):
                        #recurse
                        deplist[mypos]=dep_wordreduce(deplist[mypos],mysettings,mydbapi,mode,use_cache=use_cache)
                elif deplist[mypos]=="||":
                        pass
+               elif token[:1] == "!":
+                       deplist[mypos] = False
                else:
                        mykey = dep_getkey(deplist[mypos])
                        if mysettings and mykey in mysettings.pprovideddict and \