summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-27 01:38:36 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-27 01:38:36 +0000
commit7a3de7b22f6f4a4b65901cdba451744e07fc421d (patch)
tree6d2f996a98c84ef86321b3a1cf878f830072f1c9 /bin
parent34cf462e0d79346009462508acfb0a269300ea3a (diff)
downloadportage-7a3de7b22f6f4a4b65901cdba451744e07fc421d.tar.gz
portage-7a3de7b22f6f4a4b65901cdba451744e07fc421d.tar.bz2
portage-7a3de7b22f6f4a4b65901cdba451744e07fc421d.zip
Send the ebuild die message through eerror and make sure that elog_process() gets called when an ebuild dies. This makes the elog echo module display the die message last in case other elog messages push the original die message off of the top of the screen. (trunk r7047)
svn path=/main/branches/2.1.2/; revision=7049
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh35
-rwxr-xr-xbin/emerge3
2 files changed, 20 insertions, 18 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 30b929957..2dbe7cf9f 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -284,24 +284,25 @@ register_die_hook() {
diefunc() {
local funcname="$1" lineno="$2" exitcode="$3"
shift 3
- echo >&2
- echo "!!! ERROR: $CATEGORY/$PF failed." >&2
- dump_trace 2 1>&2
- echo " $(basename "${BASH_SOURCE[1]}"), line ${BASH_LINENO[0]}: Called die" 1>&2
- echo >&2
- echo "!!! ${*:-(no error message)}" >&2
- echo "!!! If you need support, post the topmost build error, and the call stack if relevant." >&2
+ eerror
+ eerror "ERROR: $CATEGORY/$PF failed."
+ dump_trace 2
+ eerror "$(basename "${BASH_SOURCE[1]}"), line ${BASH_LINENO[0]}: Called die"
+ eerror
+ eerror "${*:-(no error message)}"
+ eerror "If you need support, post the topmost build error, and the call stack if relevant."
[ -n "${PORTAGE_LOG_FILE}" ] && \
- echo "!!! A complete build log is located at '${PORTAGE_LOG_FILE}'." >&2
- echo >&2
+ eerror "A complete build log is located at '${PORTAGE_LOG_FILE}'."
if [ -n "${EBUILD_OVERLAY_ECLASSES}" ] ; then
- echo "This ebuild used the following eclasses from overlays:" >&2
- echo >&2
- for x in ${EBUILD_OVERLAY_ECLASSES} ; do
- echo " ${x}" >&2
- done
- echo >&2
+ eerror "This ebuild used eclasses from overlays: ${EBUILD_OVERLAY_ECLASSES}"
+ fi
+ if [ ${EBUILD#${PORTDIR}/} == ${EBUILD} ] ; then
+ local overlay=${EBUILD%/*}
+ overlay=${overlay%/*}
+ overlay=${overlay%/*}
+ eerror "This ebuild is from an overlay: '${overlay}/'"
fi
+ eerror
if [ "${EBUILD_PHASE/depend}" == "${EBUILD_PHASE}" ]; then
local x
@@ -328,7 +329,7 @@ dump_trace() {
strip=$(( $1 ))
fi
- echo "Call stack:"
+ eerror "Call stack:"
for (( n = ${#FUNCNAME[@]} - 1, p = ${#BASH_ARGV[@]} ; n > $strip ; n-- )) ; do
funcname=${FUNCNAME[${n} - 1]}
sourcefile=$(basename ${BASH_SOURCE[${n}]})
@@ -342,7 +343,7 @@ dump_trace() {
done
(( p -= ${BASH_ARGC[${n} - 1]} ))
fi
- echo " ${sourcefile}, line ${lineno}: Called ${funcname}${args:+ ${args}}"
+ eerror "${sourcefile}, line ${lineno}: Called ${funcname}${args:+ ${args}}"
done
}
diff --git a/bin/emerge b/bin/emerge
index 5aa826c93..5d75db69b 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3192,7 +3192,8 @@ class MergeTask(object):
retval = portage.doebuild(y, "package", myroot,
pkgsettings, self.edebug, mydbapi=portdb,
tree="porttree")
- if "--buildpkgonly" in self.myopts:
+ if retval != os.EX_OK or \
+ "--buildpkgonly" in self.myopts:
portage.elog_process(pkg_key, pkgsettings)
if retval != os.EX_OK:
return retval