Bug #272000 - When --keep-going is enabled, don't completely bail out at
authorZac Medico <zmedico@gentoo.org>
Fri, 9 Oct 2009 07:27:52 +0000 (07:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 9 Oct 2009 07:27:52 +0000 (07:27 -0000)
the beginning due to corrupt manifest(s). Thanks to Sebastian Mingramm (few)
for this patch.

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

pym/_emerge/Scheduler.py

index 00c27925b6a131988c03d113d43af5c90f2cb287..f2247578b19faf8923e2f257608790e87f3a5daf 100644 (file)
@@ -816,19 +816,21 @@ class Scheduler(PollScheduler):
                        self.pkgsettings[root] = portage.config(
                                clone=root_config.settings)
 
+               keep_going = "--keep-going" in self.myopts
+               fetchonly = self._build_opts.fetchonly
+               mtimedb = self._mtimedb
+               failed_pkgs = self._failed_pkgs
+
                rval = self._generate_digests()
                if rval != os.EX_OK:
                        return rval
 
+               # TODO: Immediately recalculate deps here if --keep-going
+               #       is enabled and corrupt manifests are detected.
                rval = self._check_manifests()
-               if rval != os.EX_OK:
+               if rval != os.EX_OK and not keep_going:
                        return rval
 
-               keep_going = "--keep-going" in self.myopts
-               fetchonly = self._build_opts.fetchonly
-               mtimedb = self._mtimedb
-               failed_pkgs = self._failed_pkgs
-
                while True:
                        rval = self._merge()
                        if rval == os.EX_OK or fetchonly or not keep_going: