summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-05 09:03:28 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-05 09:03:28 +0000
commitb2b9ffe2b6c8ae8cd4cdce4dbc2f210fd3468241 (patch)
tree765637a7471dfe5c805530841bd7a5f27d459144
parent6516b0319d62701bd17f7c78ebb677b7f0508f26 (diff)
downloadportage-b2b9ffe2b6c8ae8cd4cdce4dbc2f210fd3468241.tar.gz
portage-b2b9ffe2b6c8ae8cd4cdce4dbc2f210fd3468241.tar.bz2
portage-b2b9ffe2b6c8ae8cd4cdce4dbc2f210fd3468241.zip
Just use a simple replace for the needlessly complex dep_transform function. This will make it compatible with slot deps.
svn path=/main/trunk/; revision=4596
-rw-r--r--pym/portage_update.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/pym/portage_update.py b/pym/portage_update.py
index 671e9bc13..b6a724560 100644
--- a/pym/portage_update.py
+++ b/pym/portage_update.py
@@ -203,23 +203,4 @@ def update_config_files(config_root, protect, protect_mask, update_iter):
continue
def dep_transform(mydep, oldkey, newkey):
- origdep = mydep
- if not len(mydep):
- return mydep
- if mydep[0] == "*":
- mydep = mydep[1:]
- prefix = ""
- postfix = ""
- if mydep[-1] == "*":
- mydep = mydep[:-1]
- postfix = "*"
- if mydep[:2] in [">=", "<="]:
- prefix = mydep[:2]
- mydep = mydep[2:]
- elif mydep[:1] in "=<>~!":
- prefix = mydep[:1]
- mydep = mydep[1:]
- if mydep == oldkey:
- return prefix + newkey + postfix
- else:
- return origdep
+ return mydep.replace(oldkey, newkey, 1)