diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-07-11 23:45:12 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-07-11 23:45:12 +0000 |
commit | c836e4411653537e7f78f4822f8e5c8d3591ced7 (patch) | |
tree | 3d798d7762b2c2eb23f8892cf6d510ff6ac93e41 /python-updater | |
parent | Improve get_portage_python(). (diff) | |
download | python-updater-c836e4411653537e7f78f4822f8e5c8d3591ced7.tar.gz python-updater-c836e4411653537e7f78f4822f8e5c8d3591ced7.tar.bz2 python-updater-c836e4411653537e7f78f4822f8e5c8d3591ced7.zip |
Filter out --getbinpkg, --getbinpkgonly, --usepkg and --usepkgonly options in EMERGE_DEFAULT_OPTS environment variable. Bug #232304.
Diffstat (limited to 'python-updater')
-rwxr-xr-x | python-updater | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/python-updater b/python-updater index 62ca6cf..179b6fa 100755 --- a/python-updater +++ b/python-updater @@ -427,6 +427,17 @@ if [[ -n "${PIPE_COMMAND}" ]]; then exit $? fi +# Filter out --getbinpkg, --getbinpkgonly, --usepkg and --usepkgonly options in EMERGE_DEFAULT_OPTS environment variable +emerge_default_opts="" +for option in ${EMERGE_DEFAULT_OPTS}; do + if [[ "${option}" == -[[:alnum:]]* ]]; then + emerge_default_opts+=" ${option//[gGkK]/}" + elif [[ "${option}" != "--getbinpkg" && "${option}" != "--getbinpkgonly" && "${option}" != "--usepkg" && "${option}" != "--usepkgonly" ]]; then + emerge_default_opts+=" ${option}" + fi +done +export EMERGE_DEFAULT_OPTS="${emerge_default_opts# }" + # only pretending? [[ PRETEND -eq 1 ]] && PMS_OPTIONS[${PMS_INDEX}]="${PMS_OPTIONS[${PMS_INDEX}]}p" |