Bug #265034 - In depgraph.loadResumeCommand(), tolerate missing packages
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:03:46 +0000 (07:03 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 07:03:46 +0000 (07:03 -0000)
since it's possible that the resume list is still partially valid.
(trunk r13312)

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

pym/_emerge/__init__.py

index 2550577c76b715c1e0c2c0f30b75c37e557037f7..98cf1811e6a84ff49a6a8ea87876e4bb5f03477e 100644 (file)
@@ -8743,7 +8743,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.
@@ -8778,7 +8779,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]