summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xpython-updater11
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ad23764..11e76d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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"