From: Zac Medico Date: Sat, 8 Jul 2006 23:12:07 +0000 (-0000) Subject: Use a cmpsplit() function to simplify package comparisons in depgraph.select_dep(). X-Git-Tag: v2.1.1~262 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=79a388986fc33b0989c931d314fb210057c0725f;p=portage.git Use a cmpsplit() function to simplify package comparisons in depgraph.select_dep(). svn path=/main/trunk/; revision=3817 --- diff --git a/bin/emerge b/bin/emerge index f606f0680..06f09ddf4 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1093,13 +1093,13 @@ class depgraph: print "ebuild:",myeb print "binpkg:",myeb_pkg - if myeb and myeb_pkg: - myeb_s = portage.catpkgsplit(myeb) - myeb_s = [myeb_s[0]+"/"+myeb_s[1], myeb_s[2], myeb_s[3]] - myeb_pkg_s = portage.catpkgsplit(myeb_pkg) - myeb_pkg_s = [myeb_pkg_s[0]+"/"+myeb_pkg_s[1], myeb_pkg_s[2], myeb_pkg_s[3]] + def cmpsplit(cpv): + mysplit = portage.catpkgsplit(cpv) + return [mysplit[0] + "/" + mysplit[1], + mysplit[2], mysplit[3]] - if portage.pkgcmp(myeb_s, myeb_pkg_s) == 0: # pkg is same version as ebuild + if myeb and myeb_pkg: + if portage.pkgcmp(cmpsplit(myeb), cmpsplit(myeb_pkg)) == 0: myeb = None else: myeb_pkg = None