Fix depgraph._dep_check_composite_db._visible() to reject installed packages
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Dec 2008 23:39:22 +0000 (23:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Dec 2008 23:39:22 +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.

svn path=/main/trunk/; revision=12138

pym/_emerge/__init__.py

index 194e116000abb48510ff17692f2400f282d2a504..9147aa9304f82b11613490e1efbbf8b8f7baf751 100644 (file)
@@ -8217,13 +8217,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):