Add --tolerant option (already in use on master rsync mirror), requested by
authorZac Medico <zmedico@gentoo.org>
Wed, 30 Sep 2009 23:11:02 +0000 (23:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 30 Sep 2009 23:11:02 +0000 (23:11 -0000)
robbat2.

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

bin/egencache
man/egencache.1

index 69a41fde64f4baf2fe55f9f254cceea4ec9b8a93..64429296daf0b31f03ee7a81cb187555c6fa6ad1 100755 (executable)
@@ -67,6 +67,9 @@ def parse_args(args):
                action="store_true",
                help="enable rsync stat collision workaround " + \
                        "for bug 139134 (use with --update)")
+       parser.add_option("--tolerant",
+               action="store_true",
+               help="exit successfully if only minor errors occurred")
        parser.add_option("--ignore-default-opts",
                action="store_true",
                help="do not use the EGENCACHE_DEFAULT_OPTS environment variable")
@@ -343,6 +346,8 @@ def egencache_main(args):
                max_load=options.load_average,
                rsync=options.rsync)
        gen_cache.run()
+       if options.tolerant:
+               return os.EX_OK
        return gen_cache.returncode
 
 if __name__ == "__main__":
index dbcc44e4bc35f5c18c45cb446e4bc098514adcb7..d0bd1014a58e5ac2a66dcc85afef04c2047ddfc1 100644 (file)
@@ -54,6 +54,11 @@ This option should only be needed for distribution via something like
 (see \fBbug 139134\fR). It's not needed with \fBgit\fR(1) since that uses a
 more thorough mechanism which allows it to detect changed inode numbers
 (described in \fIracy-git.txt\fR in the git technical docs).
+.TP
+.BR "\-\-tolerant"
+Exit successfully if only minor errors occurred, such as skipped cache
+updates due to ebuilds that either fail to source or are not sourced
+due to invalid Manifest entries.
 .SH "ENVIRONMENT OPTIONS"
 .TP
 \fBEGENCACHE_DEFAULT_OPTS\fR