Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11702 - main/trunk/pym/_emerge
Date: Sun, 19 Oct 2008 17:33:17
Author: zmedico
Date: 2008-10-19 17:33:14 +0000 (Sun, 19 Oct 2008)
New Revision: 11702

Remove the "found_available_arg" variable from depgraph._select_pkg() and use
the "matched_packages" variable instead. This solve a problem where the
"found_available_arg" flag is unreliable due to the slot filtering behavior
of depgraph._iter_atoms_for_pkg(). For example, a higher version in a
different slot than the available ebuild might be masked or unavailable, and
depgraph._iter_atoms_for_pkg() will not identify the available ebuild as
a match due to this installed package (which is not available for reinstall).

Modified: main/trunk/pym/_emerge/
--- main/trunk/pym/_emerge/	2008-10-18 20:17:04 UTC (rev 11701)
+++ main/trunk/pym/_emerge/	2008-10-19 17:33:14 UTC (rev 11702)
@@ -5417,9 +5417,7 @@
 		# Therefore, "selective" logic does not consider
 		# whether or not an installed package matches an
 		# argument atom. It only considers whether or not
-		# available packages match argument atoms, which is
-		# represented by the found_available_arg flag.
-		found_available_arg = False
+		# available packages match argument atoms.
 		for find_existing_node in True, False:
 			if existing_node:
@@ -5428,7 +5426,7 @@
 				if installed and not find_existing_node:
 					want_reinstall = reinstall or empty or \
-						(found_available_arg and not selective)
+						(matched_packages and not selective)
 					if want_reinstall and matched_packages:
 				if hasattr(db, "xmatch"):
@@ -5568,8 +5566,6 @@
 							if not installed:
 								# masked by corruption
-					if not installed and myarg:
-						found_available_arg = True
 					if atom.use and not pkg.built:
 						use = pkg.use.enabled