From b2b9ffe2b6c8ae8cd4cdce4dbc2f210fd3468241 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 5 Oct 2006 09:03:28 +0000 Subject: [PATCH] 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 --- pym/portage_update.py | 21 +-------------------- 1 file changed, 1 insertion(+), 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) -- 2.26.2