summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-08 23:12:07 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-08 23:12:07 +0000
commit79a388986fc33b0989c931d314fb210057c0725f (patch)
treee643617097df91448a5cb1857e2325b0f9c3175d
parent0ab656f11fc37f9c1f5a64d98ab03295432e26bf (diff)
downloadportage-79a388986fc33b0989c931d314fb210057c0725f.tar.gz
portage-79a388986fc33b0989c931d314fb210057c0725f.tar.bz2
portage-79a388986fc33b0989c931d314fb210057c0725f.zip
Use a cmpsplit() function to simplify package comparisons in depgraph.select_dep().
svn path=/main/trunk/; revision=3817
-rwxr-xr-xbin/emerge12
1 files changed, 6 insertions, 6 deletions
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