summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-02 20:16:06 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-02 20:16:06 +0000
commit2425262f4aa130ee9941befce29cccb59e49aa96 (patch)
tree5d3baafd7d433b4bb9bcd63042a0d95297a7bab9
parent4f5e4f697e2593df164fc9864893768f7d2375fc (diff)
downloadportage-2425262f4aa130ee9941befce29cccb59e49aa96.tar.gz
portage-2425262f4aa130ee9941befce29cccb59e49aa96.tar.bz2
portage-2425262f4aa130ee9941befce29cccb59e49aa96.zip
Use Package.cp attribute instead of calling cpv_getkey().
svn path=/main/trunk/; revision=10102
-rw-r--r--pym/_emerge/__init__.py17
1 files 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))