From: Zac Medico Date: Sat, 22 Jul 2006 11:08:22 +0000 (-0000) Subject: Use portage.best() to simplify package comparison. X-Git-Tag: v2.1.1~153 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8951547fe8f57962fef31cf7dac2a930a9305be9;p=portage.git Use portage.best() to simplify package comparison. svn path=/main/trunk/; revision=3988 --- diff --git a/bin/emerge b/bin/emerge index 51f2e1981..e4fec2eeb 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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