isolated-functions.sh: skip set_colors for depend
authorZac Medico <zmedico@gentoo.org>
Mon, 12 Sep 2011 01:24:48 +0000 (18:24 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Sep 2011 01:24:48 +0000 (18:24 -0700)
This avoids an unneeded stty call.

bin/isolated-functions.sh

index dbd653c41f9daaec68781055c0f4877ace13e93b..733795aa1427da6e0c64d55a4d21eeb498a60f7c 100644 (file)
@@ -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