depgraph: fix KeyError in select_atoms
authorZac Medico <zmedico@gentoo.org>
Mon, 14 Feb 2011 15:29:33 +0000 (07:29 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 14 Feb 2011 15:29:33 +0000 (07:29 -0800)
This happens if depstring evaluates to nothing.

pym/_emerge/depgraph.py

index 96338742404cb3892a47e61c630672a705bbe31b..cacc8cc5824332096f8f4ffa0aab2457c192b0dc 100644 (file)
@@ -2219,6 +2219,8 @@ class depgraph(object):
                                raise portage.exception.InvalidDependString(mycheck[1])
                if parent is None:
                        selected_atoms = mycheck[1]
+               elif parent not in atom_graph:
+                       selected_atoms = {parent : mycheck[1]}
                else:
                        # Recursively traversed virtual dependencies, and their
                        # direct dependencies, are considered to have the same