From 970ef193b6456215800800ea8aa285370d4f0725 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 2 May 2008 20:31:33 +0000 Subject: [PATCH] When searching for a "sys-apps/portage" installation task, use match_pkgs() instead of sequential search. (trunk r10104) svn path=/main/branches/2.1.2/; revision=10105 --- bin/emerge | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/bin/emerge b/bin/emerge index 38997c2e0..2eb370f02 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3577,7 +3577,7 @@ class depgraph(object): complete = "complete" in self.myparams myblocker_parents = self._blocker_parents.copy() asap_nodes = [] - portage_node = None + def get_nodes(**kwargs): """ Returns leaf nodes excluding Uninstall instances @@ -3588,13 +3588,15 @@ class depgraph(object): node.operation != "uninstall"] # 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 + portage_node = self.mydbapi["/"].match_pkgs("sys-apps/portage") + if portage_node: + portage_node = portage_node[0] + else: + portage_node = None + if portage_node is not None and \ + (not mygraph.contains(portage_node) or \ + portage_node.operation == "nomerge"): + portage_node = None ignore_priority_soft_range = [None] ignore_priority_soft_range.extend( -- 2.26.2