Use portage.best() to simplify package comparison.
authorZac Medico <zmedico@gentoo.org>
Sat, 22 Jul 2006 11:08:22 +0000 (11:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 22 Jul 2006 11:08:22 +0000 (11:08 -0000)
svn path=/main/trunk/; revision=3988

bin/emerge

index 51f2e19817494484197fcce36754876355e66584..e4fec2eebd57a7be5e38ad828f2474d88f20b3f1 100755 (executable)
@@ -1108,13 +1108,9 @@ class depgraph:
                                        print "ebuild:",myeb
                                        print "binpkg:",myeb_pkg
 
-                               def cmpsplit(cpv):
-                                       mysplit = portage.catpkgsplit(cpv)
-                                       return [mysplit[0] + "/" + mysplit[1],
-                                               mysplit[2], mysplit[3]]
-
                                if myeb and myeb_pkg:
-                                       if portage.pkgcmp(cmpsplit(myeb), cmpsplit(myeb_pkg)) == 0:
+                                       bestmatch = portage.best([myeb, myeb_pkg])
+                                       if bestmatch == myeb_pkg:
                                                myeb = None
                                        else:
                                                myeb_pkg = None