From: Zac Medico Date: Thu, 5 Oct 2006 09:03:28 +0000 (-0000) Subject: Just use a simple replace for the needlessly complex dep_transform function. This... X-Git-Tag: v2.1.2~709 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b2b9ffe2b6c8ae8cd4cdce4dbc2f210fd3468241;p=portage.git 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 --- 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)