When expanding ambiguous atoms against the vardb, make sure the the expanded package...
authorZac Medico <zmedico@gentoo.org>
Tue, 17 Jul 2007 18:06:04 +0000 (18:06 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 17 Jul 2007 18:06:04 +0000 (18:06 -0000)
svn path=/main/branches/2.1.2/; revision=7295

bin/emerge

index 29753fc3647c2d9295ae249558490cbc3fd90cd9..62a3b71cc6a7cabffc8e22a7f773d093665def85 100755 (executable)
@@ -1584,11 +1584,14 @@ class depgraph:
                                        try:
                                                mykey = portage.dep_expand(x,
                                                        mydb=portdb, settings=pkgsettings)
-                                       except ValueError:
+                                       except ValueError, e:
                                                mykey = portage.dep_expand(x,
                                                        mydb=vardb, settings=pkgsettings)
-                                               if portage.dep_getkey(mykey).startswith("null/"):
+                                               cp = portage.dep_getkey(mykey)
+                                               if cp.startswith("null/") or \
+                                                       cp not in e[0]:
                                                        raise
+                                               del e
                                        arg_atoms.append((x, mykey))
                                except ValueError, errpkgs:
                                        print "\n\n!!! The short ebuild name \"" + x + "\" is ambiguous.  Please specify"