aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-09-11 18:24:48 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-11 18:24:48 -0700
commit20b0fdd6910d094b829a16c54a97f8d2900e00de (patch)
tree382ddd75d2e55a05bdce7f790155e2a3b64c34a0 /bin/isolated-functions.sh
parentMove KV funcs to bashrc-functions.sh. (diff)
downloadportage-20b0fdd6910d094b829a16c54a97f8d2900e00de.tar.gz
portage-20b0fdd6910d094b829a16c54a97f8d2900e00de.tar.bz2
portage-20b0fdd6910d094b829a16c54a97f8d2900e00de.zip
isolated-functions.sh: skip set_colors for depend
This avoids an unneeded stty call.
Diffstat (limited to 'bin/isolated-functions.sh')
-rw-r--r--bin/isolated-functions.sh21
1 files changed, 13 insertions, 8 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index dbd653c41..733795aa1 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -434,14 +434,19 @@ RC_INDENTATION=''
RC_DEFAULT_INDENT=2
RC_DOT_PATTERN=''
-case "${NOCOLOR:-false}" in
- yes|true)
- unset_colors
- ;;
- no|false)
- set_colors
- ;;
-esac
+if [[ $EBUILD_PHASE == depend ]] ; then
+ # avoid unneeded stty call in set_colors during "depend" phase
+ unset_colors
+else
+ case "${NOCOLOR:-false}" in
+ yes|true)
+ unset_colors
+ ;;
+ no|false)
+ set_colors
+ ;;
+ esac
+fi
if [[ -z ${USERLAND} ]] ; then
case $(uname -s) in