From: Zac Medico Date: Wed, 4 Oct 2006 23:02:51 +0000 (-0000) Subject: Share duplicate code between dep_getkey() and dep_getcpv(). X-Git-Tag: v2.1.2~712 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=58559fb4ae65e6a8f367a735e533edb03dc16d11;p=portage.git Share duplicate code between dep_getkey() and dep_getcpv(). svn path=/main/trunk/; revision=4593 --- diff --git a/pym/portage_dep.py b/pym/portage_dep.py index f5ea8e72d..1f20b8ac3 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -242,16 +242,7 @@ def isspecific(mypkg): return 0 def dep_getkey(mydep): - if mydep and mydep[0] == "*": - mydep = mydep[1:] - if mydep and mydep[-1] == "*": - mydep = mydep[:-1] - if mydep and mydep[0] == "!": - mydep = mydep[1:] - if mydep[:2] in [">=", "<="]: - mydep = mydep[2:] - elif mydep[:1] in "=<>~": - mydep = mydep[1:] + mydep = dep_getcpv(mydep) if mydep and isspecific(mydep): mysplit = catpkgsplit(mydep) if not mysplit: