public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r12405 - main/trunk/pym/_emerge
@ 2009-01-10  0:57 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-01-10  0:57 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-01-10 00:57:41 +0000 (Sat, 10 Jan 2009)
New Revision: 12405

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Add Blocker -> Blocked Package edges to depgraph._unsolvable_blockers since
these edges will be useful for implementing an enhanced blocker display.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2009-01-09 22:51:08 UTC (rev 12404)
+++ main/trunk/pym/_emerge/__init__.py	2009-01-10 00:57:41 UTC (rev 12405)
@@ -4482,7 +4482,7 @@
 		self._blocker_parents = digraph()
 		# Contains only irrelevant Package -> Blocker edges
 		self._irrelevant_blockers = digraph()
-		# Contains only unsolvable Package -> Blocker edges
+		# Contains only unsolvable Package -> Blocker -> Blocked Package edges
 		self._unsolvable_blockers = digraph()
 		self._slot_collision_info = {}
 		# Slot collision nodes are not allowed to block other packages since
@@ -6429,7 +6429,7 @@
 						self._blocker_parents.remove(pkg)
 				continue
 			for parent in self._blocker_parents.parent_nodes(blocker):
-				unresolved_blocks = False
+				unresolved_blocks = set()
 				depends_on_order = set()
 				for pkg in blocked_initial:
 					if pkg.slot_atom == parent.slot_atom:
@@ -6451,7 +6451,7 @@
 						continue
 					# None of the above blocker resolutions techniques apply,
 					# so apparently this one is unresolvable.
-					unresolved_blocks = True
+					unresolved_blocks.add(pkg)
 				for pkg in blocked_final:
 					if pkg.slot_atom == parent.slot_atom:
 						# TODO: Support blocks within slots.
@@ -6472,19 +6472,10 @@
 						continue
 					# None of the above blocker resolutions techniques apply,
 					# so apparently this one is unresolvable.
-					unresolved_blocks = True
+					unresolved_blocks.add(pkg)
 
-				# Make sure we don't unmerge any package that have been pulled
-				# into the graph.
 				if not unresolved_blocks and depends_on_order:
 					for inst_pkg, inst_task in depends_on_order:
-						if self.digraph.contains(inst_pkg) and \
-							self.digraph.parent_nodes(inst_pkg):
-							unresolved_blocks = True
-							break
-
-				if not unresolved_blocks and depends_on_order:
-					for inst_pkg, inst_task in depends_on_order:
 						uninst_task = Package(built=inst_pkg.built,
 							cpv=inst_pkg.cpv, installed=inst_pkg.installed,
 							metadata=inst_pkg.metadata,
@@ -6508,6 +6499,8 @@
 						self._blocker_parents.remove(parent)
 				if unresolved_blocks:
 					self._unsolvable_blockers.add(blocker, parent)
+					for pkg in unresolved_blocks:
+						self._unsolvable_blockers.add(pkg, blocker)
 
 		return True
 
@@ -7113,7 +7106,8 @@
 							root=blocker.root, eapi=blocker.eapi,
 							satisfied=True))
 
-		unsolvable_blockers = set(self._unsolvable_blockers.leaf_nodes())
+		unsolvable_blockers = set(node for node in \
+			self._unsolvable_blockers if isinstance(node, Blocker))
 		for node in myblocker_uninstalls.root_nodes():
 			unsolvable_blockers.add(node)
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-10  0:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-10  0:57 [gentoo-commits] portage r12405 - main/trunk/pym/_emerge Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox