Handle potential InvalidDependString exceptions from visible(). (trunk r9912)
authorZac Medico <zmedico@gentoo.org>
Wed, 16 Apr 2008 00:19:56 +0000 (00:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 16 Apr 2008 00:19:56 +0000 (00:19 -0000)
svn path=/main/branches/2.1.2/; revision=9913

bin/emerge

index f665bfcefba98af7535c167cb72ee5574d2fb1f2..70dbd4ddd3e6b396d020f2b9ec9ffa2a827ef04b 100755 (executable)
@@ -2875,7 +2875,10 @@ class depgraph(object):
                                                # here, packages that have been masked since they
                                                # were installed can be automatically downgraded
                                                # to an unmasked version.
-                                               if not visible(pkgsettings, pkg):
+                                               try:
+                                                       if not visible(pkgsettings, pkg):
+                                                               continue
+                                               except portage_exception.InvalidDependString:
                                                        continue
                                        if not built and not calculated_use:
                                                # This is avoided whenever possible because
@@ -4589,9 +4592,13 @@ class depgraph(object):
                                        arg = None
                                if arg:
                                        return False
-                       if pkg.installed and \
-                               not visible(self._depgraph.pkgsettings[pkg.root], pkg):
-                               return False
+                               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):