depgraph: use catsplit where appropriate
authorZac Medico <zmedico@gentoo.org>
Thu, 3 Feb 2011 07:39:09 +0000 (23:39 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 3 Feb 2011 07:40:24 +0000 (23:40 -0800)
pym/_emerge/depgraph.py

index 1a22c1bc6243b95f1be0caa602ed5460d455e0ab..05f150939a15099c3786b876c8a34159ddeba2bb 100644 (file)
@@ -2629,7 +2629,7 @@ class depgraph(object):
                        writemsg_stdout("\nemerge: there are no ebuilds to satisfy "+green(xinfo)+".\n", noiselevel=-1)
                        if isinstance(myparent, AtomArg):
                                cp = myparent.atom.cp
-                               cat, pkg = cp.split("/")
+                               cat, pkg = portage.catsplit(cp)
                                if cat == "null":
                                        cat = None
 
@@ -2647,7 +2647,7 @@ class depgraph(object):
                                else:
                                        pkg_to_cp = {}
                                        for other_cp in all_cp:
-                                               other_pkg = other_cp.split("/")[1]
+                                               other_pkg = portage.catsplit(other_cp)[1]
                                                pkg_to_cp.setdefault(other_pkg, set()).add(other_cp)
                                        pkg_matches = difflib.get_close_matches(pkg, pkg_to_cp)
                                        matches = []