Improve the error message when an eclass is not found and remove unnecesary ERRORMSG...
authorZac Medico <zmedico@gentoo.org>
Wed, 3 May 2006 23:00:08 +0000 (23:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 3 May 2006 23:00:08 +0000 (23:00 -0000)
svn path=/main/trunk/; revision=3316

bin/ebuild.sh

index d9f563a0b15cb89238d576dcd6dab6fe30f30acc..7450a10484128ab6a5bb2ad9a4fbe995922655d9 100755 (executable)
@@ -1169,6 +1169,7 @@ inherit() {
                        done
                fi
                debug-print "inherit: $1 -> $location"
+               [ ! -e "$location" ] && die "${1}.eclass could not be found by inherit()"
 
                #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.
@@ -1186,8 +1187,7 @@ inherit() {
                #turn on glob expansion
                set +f
 
-               source "$location" || export ERRORMSG="died sourcing $location in inherit()"
-               [ -z "${ERRORMSG}" ] || die "${ERRORMSG}"
+               source "$location" || die "died sourcing $location in inherit()"
 
                #turn off glob expansion
                set -f
@@ -1435,7 +1435,6 @@ if ! hasq depend $EBUILD_PHASE; then
        RESTRICT="${PORTAGE_RESTRICT}"
        unset PORTAGE_RESTRICT
 fi
-[ -z "${ERRORMSG}" ] || die "${ERRORMSG}"
 
 # Expand KEYWORDS
 # We need to turn off pathname expansion for -* in KEYWORDS and