public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-portage-dev] [PATCH 05/10] Replace _slot_collision_nodes with _package_tracker
  @ 2014-01-29 15:33 99% ` Sebastian Luther
  0 siblings, 0 replies; 1+ results
From: Sebastian Luther @ 2014-01-29 15:33 UTC (permalink / raw
  To: gentoo-portage-dev

---
 pym/_emerge/depgraph.py | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 484ac14..1bb086b 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -378,9 +378,6 @@ class _dynamic_depgraph_config(object):
 		# This use used to check if we have accounted for blockers
 		# relevant to a package.
 		self._traversed_pkg_deps = set()
-		# Slot collision nodes are not allowed to block other packages since
-		# blocker validation is only able to account for one package per slot.
-		self._slot_collision_nodes = set()
 		self._parent_atoms = {}
 		self._slot_conflict_handler = None
 		self._circular_dependency_handler = None
@@ -1799,11 +1796,16 @@ class depgraph(object):
 		buildpkgonly = "--buildpkgonly" in self._frozen_config.myopts
 		nodeps = "--nodeps" in self._frozen_config.myopts
 		if dep.blocker:
+
+			# Slot collision nodes are not allowed to block other packages since
+			# blocker validation is only able to account for one package per slot.
+			is_slot_conflict_parent = any(dep.parent in conflict.pkgs[1:] for conflict in \
+				self._dynamic_config._package_tracker.slot_conflicts())
 			if not buildpkgonly and \
 				not nodeps and \
 				not dep.collapsed_priority.ignored and \
 				not dep.collapsed_priority.optional and \
-				dep.parent not in self._dynamic_config._slot_collision_nodes:
+				not is_slot_conflict_parent:
 				if dep.parent.onlydeps:
 					# It's safe to ignore blockers if the
 					# parent is an --onlydeps node.
@@ -2019,7 +2021,6 @@ class depgraph(object):
 								level=logging.DEBUG, noiselevel=-1)
 
 				else:
-					self._add_slot_conflict(pkg)
 					if debug:
 						writemsg_level(
 							"%s%s %s\n" % ("Slot Conflict:".ljust(15),
@@ -2138,9 +2139,6 @@ class depgraph(object):
 			self._dynamic_config._slot_operator_deps[slot_key] = slot_info
 		slot_info.append(dep)
 
-	def _add_slot_conflict(self, pkg):
-		self._dynamic_config._slot_collision_nodes.add(pkg)
-
 	def _add_pkg_deps(self, pkg, allow_unsatisfied=False):
 
 		myroot = pkg.root
@@ -6019,7 +6017,7 @@ class depgraph(object):
 
 		if "complete" not in self._dynamic_config.myparams and \
 			self._dynamic_config._allow_backtracking and \
-			self._dynamic_config._slot_collision_nodes and \
+			any(self._dynamic_config._package_tracker.slot_conflicts()) and \
 			not self._accept_blocker_conflicts():
 			self._dynamic_config.myparams["complete"] = True
 
-- 
1.8.3.2



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-01-29 15:33     [gentoo-portage-dev] [PATCH 00/10] First steps to get rid of backtracking Sebastian Luther
2014-01-29 15:33 99% ` [gentoo-portage-dev] [PATCH 05/10] Replace _slot_collision_nodes with _package_tracker Sebastian Luther

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