summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-25 20:42:08 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-25 20:42:08 +0000
commit0edd3459439dd0cb4abfc537bfb89c634c2ebfd5 (patch)
tree3f10ee829753a3eaafa5c31ef5bcf1d46dc6cd93 /bin/ebuild.sh
parentUse a SIGTERM signal to support a die call inside of a subshell. (diff)
downloadportage-multirepo-0edd3459439dd0cb4abfc537bfb89c634c2ebfd5.tar.gz
portage-multirepo-0edd3459439dd0cb4abfc537bfb89c634c2ebfd5.tar.bz2
portage-multirepo-0edd3459439dd0cb4abfc537bfb89c634c2ebfd5.zip
For bug #148603, when an ebuild dies, print eclasses that are from overlays. Thanks to Alec Warner for the initial patch.
svn path=/main/trunk/; revision=5392
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index d17a5ab0..3e793a6e 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -261,6 +261,15 @@ diefunc() {
echo "!!! ${*:-(no error message)}" >&2
echo "!!! If you need support, post the topmost build error, and the call stack if relevant." >&2
echo >&2
+ 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
+ fi
+
if [ "${EBUILD_PHASE/depend}" == "${EBUILD_PHASE}" ]; then
local x
for x in $EBUILD_DEATH_HOOKS; do
@@ -1170,6 +1179,7 @@ inherit() {
fi
local location
+ local olocation
local PECLASS
local B_IUSE
@@ -1178,6 +1188,7 @@ inherit() {
local B_PDEPEND
while [ "$1" ]; do
location="${ECLASSDIR}/${1}.eclass"
+ olocation=""
# PECLASS is used to restore the ECLASS var after recursion.
PECLASS="$ECLASS"
@@ -1209,6 +1220,11 @@ inherit() {
debug-print "inherit: $1 -> $location"
[ ! -e "$location" ] && die "${1}.eclass could not be found by inherit()"
+ if [ "${location}" == "${olocation}" ] && \
+ ! hasq "${location}" ${EBUILD_OVERLAY_ECLASSES} ; then
+ EBUILD_OVERLAY_ECLASSES="${EBUILD_OVERLAY_ECLASSES} ${location}"
+ fi
+
#We need to back up the value of DEPEND and RDEPEND to B_DEPEND and B_RDEPEND
#(if set).. and then restore them after the inherit call.