svn path=/main/trunk/; revision=2952
[ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH"
source /usr/lib/portage/bin/isolated-functions.sh &>/dev/null
-# TODO: make this conditional on config settings, fix any remaining stuff
-set_colors
+
+case "${NOCOLOR:-false}" in
+ yes|true)
+ unset_colors
+ ;;
+ no|false)
+ set_colors
+ ;;
+esac
+
# the sandbox is disabled by default except when overridden in the relevant stages
export SANDBOX_ON="0"
myopts.remove("--tree")
# Set color output
-if ("--nocolor" in myopts) and (sys.stdout.isatty()):
+if "--nocolor" in myopts or \
+portage.settings["NOCOLOR"] in ("yes","true"):
nocolor()
+ if "NOCOLOR" not in portage.settings:
+ portage.settings.unlock()
+ portage.settings["NOCOLOR"] = "true"
+ portage.settings.backup_changes("NOCOLOR")
+ portage.settings.lock()
if not ("--quiet" in myopts):
if not sys.stdout.isatty() or ("--nospinner" in myopts):