expand_new_virt: don't traverse blockers
authorZac Medico <zmedico@gentoo.org>
Wed, 27 Apr 2011 16:13:51 +0000 (09:13 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 27 Apr 2011 16:13:51 +0000 (09:13 -0700)
pym/_emerge/actions.py

index 99619fa865ee4a7807970a5a0f2c90316beca4bb..59db58dbf349c9a70ca3a971f1d65d0b09baaa49 100644 (file)
@@ -1296,11 +1296,17 @@ def expand_new_virt(vardb, atom):
        or it does not match an installed package then it is
        yielded without any expansion.
        """
+       if not isinstance(atom, Atom):
+               atom = Atom(atom)
        traversed = set()
        stack = [atom]
 
        while stack:
                atom = stack.pop()
+               if atom.blocker:
+                       yield atom
+                       continue
+
                matches = vardb.match(atom)
                if not (matches and matches[-1].startswith("virtual/")):
                        yield atom