From: Zac Medico Date: Mon, 6 Nov 2006 09:19:02 +0000 (-0000) Subject: Ensure that sys-apps/portage is as close as possible to the beginning of the merge... X-Git-Tag: v2.1.2~505 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=72f9356bc228777d3316a93c8976e709aa0874e2;p=portage.git Ensure that sys-apps/portage is as close as possible to the beginning of the merge list. This is accomplished by merging it before any soft deps that it may have. svn path=/main/trunk/; revision=4949 --- diff --git a/bin/emerge b/bin/emerge index 80c0514d3..729668fb2 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1502,18 +1502,34 @@ class depgraph: retlist=[] circular_blocks = False blocker_deps = None + asap_nodes = [] if reversed: get_nodes = mygraph.root_nodes else: get_nodes = mygraph.leaf_nodes + for cpv, node in self.pkg_node_map.iteritems(): + if "portage" == portage.catsplit(portage.dep_getkey(cpv))[-1]: + asap_nodes.append(node) + break ignore_priority_range = [None] ignore_priority_range.extend( xrange(DepPriority.MIN, DepPriority.MEDIUM + 1)) while not mygraph.empty(): - for ignore_priority in ignore_priority_range: - nodes = get_nodes(ignore_priority=ignore_priority) - if nodes: - break + ignore_priority = None + nodes = None + if asap_nodes: + """ASAP nodes are merged before their soft deps.""" + for node in asap_nodes: + if not mygraph.child_nodes(node, + ignore_priority=DepPriority.SOFT): + nodes = [node] + asap_nodes.remove(node) + break + if not nodes: + for ignore_priority in ignore_priority_range: + nodes = get_nodes(ignore_priority=ignore_priority) + if nodes: + break selected_nodes = None if nodes: if ignore_priority <= DepPriority.SOFT: