From: Zac Medico Date: Fri, 14 Oct 2011 16:29:37 +0000 (-0700) Subject: repoman: support REPOMAN_DEFAULT_OPTS variable X-Git-Tag: v2.2.0_alpha68~48 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af2c4446880020871f7aaa0f3ff4f75707dd027e;p=portage.git repoman: support REPOMAN_DEFAULT_OPTS variable --- diff --git a/bin/repoman b/bin/repoman index 38f969464..65c1f40fd 100755 --- a/bin/repoman +++ b/bin/repoman @@ -218,6 +218,10 @@ def ParseArgs(argv, qahelp): parser.add_option('-i', '--ignore-arches', dest='ignore_arches', action='store_true', default=False, help='ignore arch-specific failures (where arch != host)') + parser.add_option("--ignore-default-opts", + action="store_true", + help="do not use the REPOMAN_DEFAULT_OPTS environment variable") + parser.add_option('-I', '--ignore-masked', dest='ignore_masked', action='store_true', default=False, help='ignore masked packages (not allowed with commit mode)') @@ -247,6 +251,11 @@ def ParseArgs(argv, qahelp): opts, args = parser.parse_args(argv[1:]) + if not opts.ignore_default_opts: + default_opts = repoman_settings.get("REPOMAN_DEFAULT_OPTS", "").split() + if default_opts: + opts, args = parser.parse_args(default_opts + sys.argv[1:]) + if opts.mode == 'help': parser.print_help(short=False) diff --git a/man/repoman.1 b/man/repoman.1 index f0c9eff2f..bc54657a4 100644 --- a/man/repoman.1 +++ b/man/repoman.1 @@ -47,6 +47,9 @@ Only check packages that have uncommitted modifications \fB\-i\fR, \fB\-\-ignore\-arches\fR Ignore arch-specific failures (where arch != host) .TP +\fB\-\-ignore\-default\-opts\fR +Do not use the \fIREPOMAN_DEFAULT_OPTS\fR environment variable. +.TP \fB\-I\fR, \fB\-\-ignore\-masked\fR Ignore masked packages (not allowed with commit mode) .TP diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py b/pym/portage/package/ebuild/_config/special_env_vars.py index 99321e26e..517fdf35a 100644 --- a/pym/portage/package/ebuild/_config/special_env_vars.py +++ b/pym/portage/package/ebuild/_config/special_env_vars.py @@ -157,7 +157,7 @@ environ_filter += [ "PORTAGE_RSYNC_EXTRA_OPTS", "PORTAGE_RSYNC_OPTS", "PORTAGE_RSYNC_RETRIES", "PORTAGE_SYNC_STALE", "PORTAGE_USE", "PORT_LOGDIR", "PORT_LOGDIR_CLEAN", - "QUICKPKG_DEFAULT_OPTS", + "QUICKPKG_DEFAULT_OPTS", "REPOMAN_DEFAULT_OPTS", "RESUMECOMMAND", "RESUMECOMMAND_FTP", "RESUMECOMMAND_HTTP", "RESUMECOMMAND_HTTPS", "RESUMECOMMAND_RSYNC", "RESUMECOMMAND_SFTP",