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

pym/emerge/__init__.py

index 042d2467d1b92106edcbb5ba286469e5cc48b417..0d506de05059bbddb6c7fbb15255c7b5d8118412 100644 (file)
@@ -1502,11 +1502,14 @@ class depgraph(object):
                                        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"