Consecutive eblank calls are all collapsed into a single blank line.
Thanks to Joe Peterson <lavajoe@g.o> for this patch.
(trunk r10675)
svn path=/main/branches/2.1.2/; revision=10676
local messagetype
[ -z "${1}" -o -z "${T}" -o ! -d "${T}/logging" ] && return 1
case "${1}" in
- INFO|WARN|ERROR|LOG|QA)
+ BLANK|INFO|WARN|ERROR|LOG|QA)
messagetype="${1}"
shift
;;
return 0
}
+eblank() {
+ [[ ${LAST_E_CMD} == "eblank" ]] && return 0
+ elog_base BLANK
+ [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
+ echo -e " ${NEUTRAL}*${NORMAL}"
+ LAST_E_CMD="eblank"
+ return 0
+}
+
eqawarn() {
elog_base QA "$*"
+ [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
vecho -e " ${WARN}*${NORMAL} $*" >&2
+ LAST_E_CMD="eqawarn"
return 0
}
elog() {
elog_base LOG "$*"
+ [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
echo -e " ${GOOD}*${NORMAL} $*"
+ LAST_E_CMD="elog"
return 0
}
_eend ${retval} eerror "$*"
+ LAST_E_CMD="eend"
return ${retval}
}
COLS="25 80"
ENDCOL=
+ NEUTRAL=
GOOD=
WARN=
BAD=
if [ -n "${PORTAGE_COLORMAP}" ] ; then
eval ${PORTAGE_COLORMAP}
else
+ NEUTRAL=$'\e[37m'
GOOD=$'\e[32;01m'
WARN=$'\e[33;01m'
BAD=$'\e[31;01m'
# Colors from /etc/init.d/functions.sh
codes["NORMAL"] = esc_seq + "0m"
+codes["NEUTRAL"] = codes["lightgray"]
codes["GOOD"] = codes["green"]
codes["WARN"] = codes["yellow"]
codes["BAD"] = codes["red"]
# Allow color.map to control colors associated with einfo, ewarn, etc...
mycolors = []
- for c in ("GOOD", "WARN", "BAD", "HILITE", "BRACKET"):
+ for c in ("NEUTRAL", "GOOD", "WARN", "BAD", "HILITE", "BRACKET"):
mycolors.append("%s=$'%s'" % (c, output.codes[c]))
mysettings["PORTAGE_COLORMAP"] = "\n".join(mycolors)