From 2425262f4aa130ee9941befce29cccb59e49aa96 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 2 May 2008 20:16:06 +0000 Subject: [PATCH] Use Package.cp attribute instead of calling cpv_getkey(). svn path=/main/trunk/; revision=10102 --- pym/_emerge/__init__.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 5680f39f2..303743f9e 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -3439,13 +3439,16 @@ class depgraph(object): return [node for node in mygraph.leaf_nodes(**kwargs) \ if isinstance(node, Package) and \ node.operation != "uninstall"] - if True: - for node in mygraph.order: - if node.root == "/" and \ - "sys-apps/portage" == portage.cpv_getkey(node.cpv): - portage_node = node - asap_nodes.append(node) - break + + # sys-apps/portage needs special treatment if ROOT="/" + for node in mygraph.order: + if isinstance(node, Package) and \ + "sys-apps/portage" == node.cp and \ + "/" == node.root: + portage_node = node + asap_nodes.append(node) + break + ignore_priority_soft_range = [None] ignore_priority_soft_range.extend( xrange(DepPriority.MIN, DepPriority.MEDIUM_SOFT + 1)) -- 2.26.2