Bug #265034 - In depgraph.loadResumeCommand(), tolerate missing packages
authorZac Medico <zmedico@gentoo.org>
Fri, 10 Apr 2009 19:22:01 +0000 (19:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 10 Apr 2009 19:22:01 +0000 (19:22 -0000)
since it's possible that the resume list is still partially valid.

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

pym/_emerge/__init__.py

index 0802e61438b49fbf6102e50602257251bb7b35d4..74638e1985eb890b2ad7d3f3e2d7fccf2ba10084 100644 (file)
@@ -8759,7 +8759,8 @@ class depgraph(object):
                if world_locked:
                        world_set.unlock()
 
-       def loadResumeCommand(self, resume_data, skip_masked=False):
+       def loadResumeCommand(self, resume_data, skip_masked=True,
+               skip_missing=True):
                """
                Add a resume command to the graph and validate it in the process.  This
                will raise a PackageNotFound exception if a package is not available.
@@ -8794,7 +8795,8 @@ class depgraph(object):
                                # It does no exist or it is corrupt.
                                if action == "uninstall":
                                        continue
-                               raise portage.exception.PackageNotFound(pkg_key)
+                               if not skip_missing:
+                                       raise portage.exception.PackageNotFound(pkg_key)
                        installed = action == "uninstall"
                        built = pkg_type != "ebuild"
                        root_config = self.roots[myroot]