Fix depgraph._dep_check_composite_db._visible() to reject installed packages
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Dec 2008 23:39:59 +0000 (23:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Dec 2008 23:39:59 +0000 (23:39 -0000)
that are masked. This is necessary for correct choices in || deps when we
want to ensure that installed masked packages are not preferred over other
available choices that are not masked. Thanks to Jan Kundrát <jkt@g.o> for
reporting this issue and testing the patch. (trunk r12138)

svn path=/main/branches/2.1.6/; revision=12139

pym/_emerge/__init__.py

index 7f1f846da150383fce7b591673b502f0aea51b2f..daed4789eb0c4d261328b7171af4d50e5f35e033 100644 (file)
@@ -8201,13 +8201,13 @@ class depgraph(object):
                                        arg = None
                                if arg:
                                        return False
-                               if pkg.installed:
-                                       try:
-                                               if not visible(
-                                                       self._depgraph.pkgsettings[pkg.root], pkg):
-                                                       return False
-                                       except portage.exception.InvalidDependString:
-                                               pass
+                       if pkg.installed:
+                               try:
+                                       if not visible(
+                                               self._depgraph.pkgsettings[pkg.root], pkg):
+                                               return False
+                               except portage.exception.InvalidDependString:
+                                       pass
                        return True
 
                def _dep_expand(self, atom):