summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-04 23:02:51 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-04 23:02:51 +0000
commit58559fb4ae65e6a8f367a735e533edb03dc16d11 (patch)
tree71a22e75db70dbced6dc4dbd5f7171a4ee8c5a97
parentc94ce968dd8319c5c9b996af681055d9e822d57c (diff)
downloadportage-58559fb4ae65e6a8f367a735e533edb03dc16d11.tar.gz
portage-58559fb4ae65e6a8f367a735e533edb03dc16d11.tar.bz2
portage-58559fb4ae65e6a8f367a735e533edb03dc16d11.zip
Share duplicate code between dep_getkey() and dep_getcpv().
svn path=/main/trunk/; revision=4593
-rw-r--r--pym/portage_dep.py11
1 files changed, 1 insertions, 10 deletions
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: