Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9886 - main/trunk/pym/_emerge
Date: Mon, 14 Apr 2008 01:23:49
Message-Id: E1JlDQA-0003hr-Vt@stork.gentoo.org
Author: zmedico
Date: 2008-04-14 01:23:45 +0000 (Mon, 14 Apr 2008)
New Revision: 9886

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Fix some breakage in the allow_unsatisfied handling.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2008-04-14 01:12:03 UTC (rev 9885)
+++ main/trunk/pym/_emerge/__init__.py	2008-04-14 01:23:45 UTC (rev 9886)
@@ -1780,7 +1780,8 @@
 		while dep_stack:
 			dep = dep_stack.pop()
 			if isinstance(dep, Package):
-				if not self._add_pkg_deps(dep):
+				if not self._add_pkg_deps(dep,
+					allow_unsatisfied=allow_unsatisfied):
 					return 0
 				continue
 			if not self._add_dep(dep, allow_unsatisfied=allow_unsatisfied):
@@ -1997,7 +1998,7 @@
 		dep_stack.append(pkg)
 		return 1
 
-	def _add_pkg_deps(self, pkg):
+	def _add_pkg_deps(self, pkg, allow_unsatisfied=False):
 
 		mytype = pkg.type_name
 		myroot = pkg.root
@@ -2071,9 +2072,11 @@
 					mypriority = dep_priority.copy()
 					if not blocker and vardb.match(atom):
 						mypriority.satisfied = True
-					self._add_dep(Dependency(atom=atom,
+					if not self._add_dep(Dependency(atom=atom,
 						blocker=blocker, depth=depth, parent=pkg,
-						priority=mypriority, root=dep_root))
+						priority=mypriority, root=dep_root),
+						allow_unsatisfied=allow_unsatisfied):
+						return 0
 				if debug:
 					print "Exiting...", jbigkey
 		except ValueError, e:

-- 
gentoo-commits@l.g.o mailing list