egencache: don't ignore as much with --tolerant
authorZac Medico <zmedico@gentoo.org>
Sun, 13 Feb 2011 08:33:51 +0000 (00:33 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 14 Feb 2011 04:26:54 +0000 (20:26 -0800)
Errors returned from --update-use-local-desc and --update-changelogs
are no longer ignored with --tolerant. This will fix part of
bug #354687.

bin/egencache

index 76dd900e7fb7ca36b48d29f8ab03264f3fc1e881..89d2fdec476148fc11063f3aef5d390f68f03a5a 100755 (executable)
@@ -791,7 +791,10 @@ def egencache_main(args):
                        max_load=options.load_average,
                        rsync=options.rsync)
                gen_cache.run()
-               ret.append(gen_cache.returncode)
+               if options.tolerant:
+                       ret.append(os.EX_OK)
+               else:
+                       ret.append(gen_cache.returncode)
 
        if options.update_use_local_desc:
                gen_desc = GenUseLocalDesc(portdb,
@@ -805,8 +808,6 @@ def egencache_main(args):
                gen_clogs.run()
                ret.append(gen_clogs.returncode)
 
-       if options.tolerant:
-               return ret[0]
        return max(ret)
 
 if __name__ == "__main__":