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 | |
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.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | python-updater | 11 |
2 files changed, 16 insertions, 0 deletions
@@ -3,6 +3,11 @@ ChangeLog for python-updater This file lists all changes except typo and formatting fixes. +2009-07-12 Arfrever Frehtes Taifersar Arahesis + + * python-updater: Filter out --getbinpkg, --getbinpkgonly, --usepkg and + --usepkgonly options in EMERGE_DEFAULT_OPTS environment variable. Bug #232304. + 2009-07-11 Arfrever Frehtes Taifersar Arahesis * python-updater: Avoid problems when '/var/db/pkg' is a symlink. 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" |